Skip to content

Commit

Permalink
Add a benchmark for addTagsToName
Browse files Browse the repository at this point in the history
  • Loading branch information
prashantv committed Jan 21, 2016
1 parent 87fa6d9 commit b26d6c4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions stats/reporter_test.go
Expand Up @@ -2,6 +2,18 @@ package stats


import "testing" import "testing"


func BenchmarkAddTagsToName(b *testing.B) {
tags := map[string]string{
"host": "myhost",
"endpoint": "hello",
"os": "OS X",
"browser": "Chrome",
}
for i := 0; i < b.N; i++ {
addTagsToName("recv.calls", tags)
}
}

func TestAddTagsToName(t *testing.T) { func TestAddTagsToName(t *testing.T) {
tests := []struct { tests := []struct {
name string name string
Expand Down

0 comments on commit b26d6c4

Please sign in to comment.