Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions cmd/tools/template/template_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,17 @@ func TestMetricsAreSortedAndNoDuplicates(t *testing.T) {
}, allTemplatesButEms...)
}

// Tests that zapiperf metrics should not have caret
func TestZapiPerfMetricsHaveNoCaret(t *testing.T) {
visitTemplates(t, func(path string, model Model) {
for _, metric := range model.metrics {
if strings.HasPrefix(metric.line, "^") {
t.Errorf("counter %s should not have ^^ at path=[%s]", metric.line, shortPath(path))
}
}
}, []string{"zapiperf"}...)
}

func checkForDuplicateMetrics(t *testing.T, model Model, path string) {
dupSet := make(map[string]bool)
for _, m := range model.metrics {
Expand Down
Loading