MCPcopy
hub / github.com/redis/go-redis / poolStatsAttrs

Function poolStatsAttrs

extra/redisotel/metrics.go:130–135  ·  view source on GitHub ↗
(conf *config)

Source from the content-addressed store, hash-verified

128}
129
130func poolStatsAttrs(conf *config) (poolAttrs, idleAttrs, usedAttrs attribute.Set) {
131 poolAttrs = attribute.NewSet(conf.attrs...)
132 idleAttrs = attribute.NewSet(append(poolAttrs.ToSlice(), attribute.String("state", "idle"))...)
133 usedAttrs = attribute.NewSet(append(poolAttrs.ToSlice(), attribute.String("state", "used"))...)
134 return
135}
136
137func reportPoolStats(rdb *redis.Client, conf *config) (metric.Registration, error) {
138 poolAttrs, idleAttrs, usedAttrs := poolStatsAttrs(conf)

Callers 2

Test_poolStatsAttrsFunction · 0.85
reportPoolStatsFunction · 0.85

Calls 1

StringMethod · 0.65

Tested by 1

Test_poolStatsAttrsFunction · 0.68