Commit 67afe45
committed
Expose the global default metrics
This should make it easier to test code that uses go-metrics. In tests the code can be
passed a different instance of Metrics, and in production code paths it can use the global
Metrics returned from Default().
Without this change patching the global can cause flaky tests when other tests attempt to
emit metrics at the same time.1 parent 3901aee commit 67afe45
1 file changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
51 | 56 | | |
52 | 57 | | |
53 | 58 | | |
| |||
0 commit comments