Add tag support in statsd reporter | Upgrade go-statsd-client#163
Open
isopropylcyanide wants to merge 2 commits intouber-go:masterfrom
Open
Add tag support in statsd reporter | Upgrade go-statsd-client#163isopropylcyanide wants to merge 2 commits intouber-go:masterfrom
isopropylcyanide wants to merge 2 commits intouber-go:masterfrom
Conversation
| // To view statsd emitted metrics locally you can use | ||
| // netcat with "nc 8125 -l -u" | ||
| func main() { | ||
| statter, err := statsd.NewBufferedClient("127.0.0.1:8125", |
| defer closer.Close() | ||
|
|
||
| counter := scope.Counter("test-counter") | ||
| defer func(closer io.Closer) { |
Author
There was a problem hiding this comment.
closer.close returns an error
| // no-op | ||
| } | ||
|
|
||
| func getStatsdTagPairs(tags map[string]string) []statsd.Tag { |
Author
There was a problem hiding this comment.
~/gocode/src/github.com/uber-go/tally/statsd master !4 ?1 ❯ go test . -run none -bench BenchmarkGetStatsdTagPairs --benchtime 3s -benchmem ▼
goos: darwin
goarch: amd64
pkg: github.com/uber-go/tally/statsd
cpu: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
BenchmarkGetStatsdTagPairs-12 31455973 105.0 ns/op 64 B/op 1 allocs/op
PASS
ok github.com/uber-go/tally/statsd 3.943s
- Benchmark
func BenchmarkGetStatsdTagPairs(b *testing.B) {
tags := map[string]string{
"K1": "V1",
"K2": "V2",
}
b.ResetTimer()
for i := 0; i < b.N; i++ {
_ = getStatsdTagPairs(tags)
}
}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Description
This PR adds / changes the following
cactus-statsd-clienttov5Motivation & Context
How was this tested?
offset=-34.34anddev=localBench stats
Here's the benchstat between old (master) and new (this branch)