()
| 73 | type statsUpload struct{ uploadtest.Base } |
| 74 | |
| 75 | func (statsUpload) Stats() baker.UploadStats { |
| 76 | bag := baker.MetricsBag{} |
| 77 | bag.AddRawCounter("upload.raw_count", 12) |
| 78 | bag.AddDeltaCounter("upload.delta_counter", 9) |
| 79 | bag.AddGauge("upload.gauge", math.Pi*4) |
| 80 | bag.AddHistogram("upload.hist", []float64{8, 9, 10, 11}) |
| 81 | bag.AddTimings("upload.timings", []time.Duration{1 * time.Microsecond, 10 * time.Microsecond, 100 * time.Microsecond}) |
| 82 | |
| 83 | return baker.UploadStats{ |
| 84 | NumProcessedFiles: 17, |
| 85 | NumErrorFiles: 3, |
| 86 | CustomStats: map[string]string{"k5": "v5", "k6": "v6", "k7": "v7"}, |
| 87 | Metrics: bag, |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | func TestStatsDumper(t *testing.T) { |
| 92 | // Check that the StatsDumper correctly reports the metrics gathered from |
nothing calls this directly
no test coverage detected