Skip to content
This repository has been archived by the owner on Oct 17, 2018. It is now read-only.

Commit

Permalink
address comments, reuse bitset, create policy/unaggregated
Browse files Browse the repository at this point in the history
  • Loading branch information
Chao Wang committed May 24, 2017
1 parent dc33b9a commit fada1b2
Show file tree
Hide file tree
Showing 37 changed files with 1,918 additions and 1,640 deletions.
16 changes: 10 additions & 6 deletions generated/proto/policy.proto
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,22 @@ syntax = "proto3";
package schema;

message Resolution {
int64 window_size = 1;
int64 precision = 2;
int64 window_size = 1;
int64 precision = 2;
}

message Retention {
int64 period = 1;
int64 period = 1;
}

message Policy {
Resolution resolution = 1;
Retention retention = 2;
repeated AggregationType aggregation_types = 3;
Resolution resolution = 1;
Retention retention = 2;
}

message UnaggregatedPolicy {
Policy policy = 1;
repeated AggregationType aggregation_types = 2;
}

enum AggregationType {
Expand Down
4 changes: 2 additions & 2 deletions generated/proto/rule.proto
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ message MappingRuleSnapshot {
bool tombstoned = 2;
int64 cutover_time = 3;
map<string,string> tag_filters = 4;
repeated Policy policies = 5;
repeated UnaggregatedPolicy policies = 5;
}

message MappingRule {
Expand All @@ -39,7 +39,7 @@ message MappingRule {
message RollupTarget {
string name = 1;
repeated string tags = 2;
repeated Policy policies = 3;
repeated UnaggregatedPolicy policies = 3;
}

message RollupRuleSnapshot {
Expand Down
1 change: 1 addition & 0 deletions generated/proto/schema/namespace.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

71 changes: 45 additions & 26 deletions generated/proto/schema/policy.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

84 changes: 42 additions & 42 deletions generated/proto/schema/rule.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions glide.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,5 @@ testImport:
version: d77da356e56a7428ad25149ca77381849a6a5232
subpackages:
- require
- package: github.com/cw9/bitset
version: d79da395ef228e37d81befaf8c71827ab0cb2275
8 changes: 4 additions & 4 deletions metric/unaggregated/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"fmt"

"github.com/m3db/m3metrics/metric/id"
"github.com/m3db/m3metrics/policy"
uaggregatedp "github.com/m3db/m3metrics/policy/unaggregated"
"github.com/m3db/m3x/pool"
)

Expand Down Expand Up @@ -73,19 +73,19 @@ type Gauge struct {
// CounterWithPoliciesList is a counter with applicable policies list.
type CounterWithPoliciesList struct {
Counter
policy.PoliciesList
uaggregatedp.PoliciesList
}

// BatchTimerWithPoliciesList is a batch timer with applicable policies list.
type BatchTimerWithPoliciesList struct {
BatchTimer
policy.PoliciesList
uaggregatedp.PoliciesList
}

// GaugeWithPoliciesList is a gauge with applicable policies list.
type GaugeWithPoliciesList struct {
Gauge
policy.PoliciesList
uaggregatedp.PoliciesList
}

// MetricUnion is a union of different types of metrics, only one of which is valid
Expand Down
Loading

0 comments on commit fada1b2

Please sign in to comment.