Skip to content

GC reduces value of go_memstats_mallocs_total counter (collectors.NewGoCollector) #1300

Open
@towleeee

Description

@towleeee

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.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions