Re: [go-nuts] TotalAlloc dropped in runtime/metrics

2021-04-29 Thread 'Michael Knyszek' via golang-nuts
Hi Marco, https://go-review.googlesource.com/c/go/+/312431 just landed and
should resolve the issue for Go 1.17.

On Tue, Apr 20, 2021 at 3:28 PM Michael Knyszek  wrote:

> Oh, actually, you can compute Mallocs and Frees from allocs-by-size and
> frees-by-size (summing the total # of samples). You can only estimate
> TotalAlloc though, which is genuinely missing.
>
> On Tue, Apr 20, 2021 at 3:14 PM Michael Knyszek 
> wrote:
>
>> Oh gosh, I think TotalAlloc, Mallocs, and Frees are actually an oversight
>> on my part. Sorry about that. They're very easy to add and I can probably
>> even add them for this release.
>>
>> Please do use the new runtime/metrics package!
>>
>> Most of the other metrics should be there in some form (e.g. the
>> divisions are a little different; they're meant to be more orthogonal to
>> each other... GC pause latencies are now in a histogram) and new ones are
>> going to be added in the next release and in the future. Also: today, it
>> does not have the same stop-the-world penalty that ReadMemStats has, so I
>> recommend it on that basis.
>>
>> On Tue, Apr 20, 2021 at 3:08 PM Ian Lance Taylor  wrote:
>>
>>> [ + mknyszek ]
>>>
>>> On Tue, Apr 20, 2021 at 11:12 AM Marco A.  wrote:
>>> >
>>> > Hi everyone,
>>> >
>>> > I was considering using the new stable metrics interface with go 1.16 (
>>> https://golang.org/pkg/runtime/metrics/) for our program and I was also
>>> wondering why things like TotalAlloc (
>>> https://golang.org/pkg/runtime/#MemStats) had been dropped in the
>>> available metrics.
>>> >
>>> > Any particular reasoning behind this?
>>> >
>>> > --
>>> > You received this message because you are subscribed to the Google
>>> Groups "golang-nuts" group.
>>> > To unsubscribe from this group and stop receiving emails from it, send
>>> an email to golang-nuts+unsubscr...@googlegroups.com.
>>> > To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/golang-nuts/c12d3534-d0b3-4567-9bc8-7cdcfb63c23cn%40googlegroups.com
>>> .
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAFza%2Bu_SZRSpeEBHJ904jChgs%3D_Fu_ws8EGG8Zwh2jd174BmLg%40mail.gmail.com.


Re: [go-nuts] TotalAlloc dropped in runtime/metrics

2021-04-21 Thread Marco A.
Thanks Michael, do not worry about TotalAlloc.. we do have that metric to 
replace somehow but we might even think about dropping it completely.

I was honestly wondering if TotalAlloc (cumulative bytes allocated for heap 
objects) is a useful metric to have at all since Go uses garbage 
collection. I don't believe this could even be useful for heap 
fragmentation, but I'd like to hear your thoughts on the matter since 
you're obviously more experienced than me in this regard.

Il giorno martedì 20 aprile 2021 alle 21:29:28 UTC+2 Michael Knyszek ha 
scritto:

> Oh, actually, you can compute Mallocs and Frees from allocs-by-size and 
> frees-by-size (summing the total # of samples). You can only estimate 
> TotalAlloc though, which is genuinely missing.
>
> On Tue, Apr 20, 2021 at 3:14 PM Michael Knyszek  
> wrote:
>
>> Oh gosh, I think TotalAlloc, Mallocs, and Frees are actually an oversight 
>> on my part. Sorry about that. They're very easy to add and I can probably 
>> even add them for this release.
>>
>> Please do use the new runtime/metrics package!
>>
>> Most of the other metrics should be there in some form (e.g. the 
>> divisions are a little different; they're meant to be more orthogonal to 
>> each other... GC pause latencies are now in a histogram) and new ones are 
>> going to be added in the next release and in the future. Also: today, it 
>> does not have the same stop-the-world penalty that ReadMemStats has, so I 
>> recommend it on that basis.
>>
>> On Tue, Apr 20, 2021 at 3:08 PM Ian Lance Taylor  
>> wrote:
>>
>>> [ + mknyszek ]
>>>
>>> On Tue, Apr 20, 2021 at 11:12 AM Marco A.  wrote:
>>> >
>>> > Hi everyone,
>>> >
>>> > I was considering using the new stable metrics interface with go 1.16 (
>>> https://golang.org/pkg/runtime/metrics/) for our program and I was also 
>>> wondering why things like TotalAlloc (
>>> https://golang.org/pkg/runtime/#MemStats) had been dropped in the 
>>> available metrics.
>>> >
>>> > Any particular reasoning behind this?
>>> >
>>> > --
>>> > You received this message because you are subscribed to the Google 
>>> Groups "golang-nuts" group.
>>> > To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to golang-nuts...@googlegroups.com.
>>> > To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/golang-nuts/c12d3534-d0b3-4567-9bc8-7cdcfb63c23cn%40googlegroups.com
>>> .
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/08be710b-78de-4f48-b9dd-afc0435c6683n%40googlegroups.com.


Re: [go-nuts] TotalAlloc dropped in runtime/metrics

2021-04-20 Thread 'Michael Knyszek' via golang-nuts
Oh, actually, you can compute Mallocs and Frees from allocs-by-size and
frees-by-size (summing the total # of samples). You can only estimate
TotalAlloc though, which is genuinely missing.

On Tue, Apr 20, 2021 at 3:14 PM Michael Knyszek  wrote:

> Oh gosh, I think TotalAlloc, Mallocs, and Frees are actually an oversight
> on my part. Sorry about that. They're very easy to add and I can probably
> even add them for this release.
>
> Please do use the new runtime/metrics package!
>
> Most of the other metrics should be there in some form (e.g. the divisions
> are a little different; they're meant to be more orthogonal to each
> other... GC pause latencies are now in a histogram) and new ones are going
> to be added in the next release and in the future. Also: today, it does not
> have the same stop-the-world penalty that ReadMemStats has, so I recommend
> it on that basis.
>
> On Tue, Apr 20, 2021 at 3:08 PM Ian Lance Taylor  wrote:
>
>> [ + mknyszek ]
>>
>> On Tue, Apr 20, 2021 at 11:12 AM Marco A.  wrote:
>> >
>> > Hi everyone,
>> >
>> > I was considering using the new stable metrics interface with go 1.16 (
>> https://golang.org/pkg/runtime/metrics/) for our program and I was also
>> wondering why things like TotalAlloc (
>> https://golang.org/pkg/runtime/#MemStats) had been dropped in the
>> available metrics.
>> >
>> > Any particular reasoning behind this?
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> Groups "golang-nuts" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> an email to golang-nuts+unsubscr...@googlegroups.com.
>> > To view this discussion on the web visit
>> https://groups.google.com/d/msgid/golang-nuts/c12d3534-d0b3-4567-9bc8-7cdcfb63c23cn%40googlegroups.com
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAFza%2Bu-E8yBaxOkvMrSLpPUcSzLjJedB_LcKhTQTxqhJuTMqgQ%40mail.gmail.com.


Re: [go-nuts] TotalAlloc dropped in runtime/metrics

2021-04-20 Thread 'Michael Knyszek' via golang-nuts
Oh gosh, I think TotalAlloc, Mallocs, and Frees are actually an oversight
on my part. Sorry about that. They're very easy to add and I can probably
even add them for this release.

Please do use the new runtime/metrics package!

Most of the other metrics should be there in some form (e.g. the divisions
are a little different; they're meant to be more orthogonal to each
other... GC pause latencies are now in a histogram) and new ones are going
to be added in the next release and in the future. Also: today, it does not
have the same stop-the-world penalty that ReadMemStats has, so I recommend
it on that basis.

On Tue, Apr 20, 2021 at 3:08 PM Ian Lance Taylor  wrote:

> [ + mknyszek ]
>
> On Tue, Apr 20, 2021 at 11:12 AM Marco A.  wrote:
> >
> > Hi everyone,
> >
> > I was considering using the new stable metrics interface with go 1.16 (
> https://golang.org/pkg/runtime/metrics/) for our program and I was also
> wondering why things like TotalAlloc (
> https://golang.org/pkg/runtime/#MemStats) had been dropped in the
> available metrics.
> >
> > Any particular reasoning behind this?
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "golang-nuts" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to golang-nuts+unsubscr...@googlegroups.com.
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/c12d3534-d0b3-4567-9bc8-7cdcfb63c23cn%40googlegroups.com
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAFza%2Bu954NiVW63%3DwGQD-97jXdats6UAB9p%2BrpiZHrLYP4EbRA%40mail.gmail.com.


Re: [go-nuts] TotalAlloc dropped in runtime/metrics

2021-04-20 Thread Ian Lance Taylor
[ + mknyszek ]

On Tue, Apr 20, 2021 at 11:12 AM Marco A.  wrote:
>
> Hi everyone,
>
> I was considering using the new stable metrics interface with go 1.16 
> (https://golang.org/pkg/runtime/metrics/) for our program and I was also 
> wondering why things like TotalAlloc 
> (https://golang.org/pkg/runtime/#MemStats) had been dropped in the available 
> metrics.
>
> Any particular reasoning behind this?
>
> --
> You received this message because you are subscribed to the Google Groups 
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to golang-nuts+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/golang-nuts/c12d3534-d0b3-4567-9bc8-7cdcfb63c23cn%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAOyqgcVaOn6QaP7uaxi27e4-mHc%2BiK-QZw%2B0CNbT%2Bf4zdnOdfA%40mail.gmail.com.