ekg-core icon indicating copy to clipboard operation
ekg-core copied to clipboard

Follow new naming in GHC.Stats, add new stats

Open nh2 opened this issue 7 years ago • 11 comments

Fixes #29.

Based on #28 for GHC 8.6 compatibility.

I've tested it with:

  • Stackage lts-12.17
  • Stackage nightly-2018-11-08

nh2 avatar Nov 08 '18 14:11 nh2

Urgh, cumulative_par_balanced_copied_bytes has a missing @since 4.12.0.0 in https://downloads.haskell.org/~ghc/master/libraries/html/base/GHC-Stats.html, will fix.

nh2 avatar Nov 08 '18 14:11 nh2

Looks like the ekg package's Javascript also has to be updated, it refers to the old names and there's no compile-time check for that:

https://github.com/tibbe/ekg/blob/07ac776ef90b8d6f5629568a5a28d911a0e267b0/assets/monitor.js#L337

That's why all my graphs are empty if just applying this ekg-core patch, and all values in the top right are 0.

nh2 avatar Nov 08 '18 15:11 nh2

I think I'll do a GHC 8.6-compatible point release first, and then a major release with this change. ekg-statsd, ekg-json, and ekg may also require updates.

23Skidoo avatar Nov 08 '18 20:11 23Skidoo

I think I'll do a GHC 8.6-compatible point release first, and then a major release with this change.

That sounds prudent to me.

ekg-statsd, ekg-json, and ekg may also require updates.

ekg for sure, I already have a branch that does this which I'm currently testing. The other two I'm not using so I might need some help with those.

nh2 avatar Nov 09 '18 14:11 nh2

I think I'll do a GHC 8.6-compatible point release first

This is now done.

23Skidoo avatar Nov 19 '18 20:11 23Skidoo

Doesn't seem like a great idea to me. Can't we use new names with base <4.10 as well?

I have force-pushed to implement this suggestion (and also to address all other feedback). Now it translates the old API to the new field names.


For easy review comparison I have diffed the fields used by not(MIN_VERSION_base(4,10,0)) and MIN_VERSION_base(4,10,0) in meld, showing that the first is a subset of the other:

image


The change has now been tested on Stackage versions:

  • lts-14.27 (GHC 8.6.5)
  • nightly-2018-11-08 (GHC 8.6.1)
  • lts-12.17 (GHC 8.4.4)
  • lts-9.21 (ghc-8.0.2) -- this is base 4.9

nh2 avatar Mar 25 '20 01:03 nh2

ekg javascript/HTML PR at https://github.com/tibbe/ekg/pull/80

nh2 avatar Mar 25 '20 01:03 nh2

ekg-statsd, ekg-json, and ekg may also require updates.

  • ekg: https://github.com/tibbe/ekg/pull/80 (only needs a few fields renamed)
  • ekg-json: seems to require no update, as it does not refer to any specific field names
  • ekg-statsd: same

nh2 avatar Mar 25 '20 01:03 nh2

This PR seems worth resurrecting. There are now additional stats from base-4.14.1.0+ tracking the non moving GC. What is pending to get this across the line. How can I help?

eborden avatar Nov 10 '21 22:11 eborden

The newer stats are

Stats.RTSStats
  { nonmoving_gc_sync_cpu_ns
  , nonmoving_gc_sync_elapsed_ns
  , nonmoving_gc_sync_max_elapsed_ns
  , nonmoving_gc_cpu_ns
  , nonmoving_gc_elapsed_ns
  , nonmoving_gc_max_elapsed_ns
  }

and

Stats.GCDetails
  { gcdetails_nonmoving_gc_sync_cpu_ns
  , gcdetails_nonmoving_gc_sync_elapsed_ns
  }

eborden avatar Nov 10 '21 22:11 eborden

Gentle ping, another year later

NorfairKing avatar Dec 04 '22 23:12 NorfairKing