MCPcopy Create free account
hub / github.com/AdRoll/baker / Stats

Method Stats

stats_test.go:24–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22type statsInput struct{ inputtest.Base }
23
24func (statsInput) Stats() baker.InputStats {
25 bag := baker.MetricsBag{}
26 bag.AddRawCounter("input.raw_count", 10)
27 bag.AddDeltaCounter("input.delta_counter", 1)
28 bag.AddGauge("input.gauge", math.Pi)
29 bag.AddHistogram("input.hist", []float64{1, 2, 3})
30 bag.AddTimings("input.timings", []time.Duration{1 * time.Second, 10 * time.Second, 100 * time.Second})
31
32 return baker.InputStats{
33 NumProcessedLines: 93,
34 CustomStats: map[string]string{"k1": "v1", "k2": "v2"},
35 Metrics: bag,
36 }
37}
38
39type statsFilter struct{ filtertest.Base }
40

Callers

nothing calls this directly

Calls 5

AddRawCounterMethod · 0.95
AddDeltaCounterMethod · 0.95
AddGaugeMethod · 0.95
AddHistogramMethod · 0.95
AddTimingsMethod · 0.95

Tested by

no test coverage detected