client_golang icon indicating copy to clipboard operation
client_golang copied to clipboard

GC reduces value of go_memstats_mallocs_total counter (collectors.NewGoCollector)

Open towleeee opened this issue 2 years ago • 0 comments

github.com/prometheus/client_golang v1.16.0 go version: go1.17.11

Before GC:

go_gc_duration_seconds_sum 0.002715273
go_memstats_mallocs_total 87459

go_gc_duration_seconds_sum 0.002715273
go_memstats_mallocs_total 87796

After:

go_gc_duration_seconds_sum 0.002747097
go_memstats_mallocs_total 78381

the other counters seem to behave the same way. Expected: prometheus counter (a single whose value can only increase or be reset to zero on restart.)

towleeee avatar Jun 20 '23 11:06 towleeee