Skip to content

Commit

Permalink
Added Sum stat resolver
Browse files Browse the repository at this point in the history
  • Loading branch information
codebien committed Nov 29, 2022
1 parent 616e5e2 commit b476d43
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions metrics/sample.go
Expand Up @@ -145,6 +145,7 @@ func GetResolversForTrendColumns(trendColumns []string) (map[string]func(s *Tren
"med": func(s *TrendSink) float64 { return s.P(0.5) },
"max": func(s *TrendSink) float64 { return s.Max },
"count": func(s *TrendSink) float64 { return float64(s.Count) },
"sum": func(s *TrendSink) float64 { return s.Sum },
}
dynamicResolver := func(percentile float64) func(s *TrendSink) float64 {
return func(s *TrendSink) float64 {
Expand Down
2 changes: 1 addition & 1 deletion metrics/value_type.go
Expand Up @@ -5,7 +5,7 @@ import "errors"
// Possible values for ValueType.
const (
Default = ValueType(iota) // Values are presented as-is
Time // Values are timestamps (nanoseconds)
Time // Values are timestamps (milliseconds)
Data // Values are data amounts (bytes)
)

Expand Down

0 comments on commit b476d43

Please sign in to comment.