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

Method Stats

stats_test.go:57–71  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

55type statsOutput struct{ outputtest.Base }
56
57func (statsOutput) Stats() baker.OutputStats {
58 bag := baker.MetricsBag{}
59 bag.AddRawCounter("output.raw_count", 3)
60 bag.AddDeltaCounter("output.delta_counter", 7)
61 bag.AddGauge("output.gauge", math.Pi*3)
62 bag.AddHistogram("output.hist", []float64{8, 9, 10, 11})
63 bag.AddTimings("output.timings", []time.Duration{1 * time.Hour, 10 * time.Hour, 100 * time.Hour})
64
65 return baker.OutputStats{
66 NumProcessedLines: 53,
67 NumErrorLines: 7,
68 CustomStats: map[string]string{"k3": "v3", "k4": "v4"},
69 Metrics: bag,
70 }
71}
72
73type statsUpload struct{ uploadtest.Base }
74

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