Rename metrics

This commit is contained in:
9seconds
2021-03-29 11:03:54 +03:00
parent 4c3f42e264
commit 36d695118e
5 changed files with 75 additions and 100 deletions
+4 -6
View File
@@ -4,17 +4,15 @@ import "sync"
var streamInfoPool = sync.Pool{
New: func() interface{} {
return &streamInfo{
tags: map[string]string{},
}
return streamInfo{}
},
}
func acquireStreamInfo() *streamInfo {
return streamInfoPool.Get().(*streamInfo)
func acquireStreamInfo() streamInfo {
return streamInfoPool.Get().(streamInfo)
}
func releaseStreamInfo(info *streamInfo) {
func releaseStreamInfo(info streamInfo) {
info.Reset()
streamInfoPool.Put(info)
}