Open nh2 opened 5 years ago
There are also oddities like this, where two apparently very different concepts are filled in by the same variable:
, ("rts.gc.par_tot_bytes_copied" , Gauge . fromIntegral . Stats.par_copied_bytes)
, ("rts.gc.par_avg_bytes_copied" , Gauge . fromIntegral . Stats.par_copied_bytes)
This is likely because of commit https://github.com/ghc/ghc/commit/ef9e3483150ad759938dacebf47e5c484c451602 which renamed it, but EKG also keeping the old (and as per the GHC commit, wrong and confusing) name seems like something we'd want to clean up enventually.
Let's go for it (unless @tibbe objects). This will require a major version bump.
I'll make a PR for it.
@23Skidoo Shall I base it on https://github.com/tibbe/ekg-core/pull/28 ?
Looks like we very very likely want to have that, and I can add in the newly added stats in the same run.
PR at #30
If long enough time has passed I think it makes sense to break backwards compatibility. Ideally we add the right name in release N and in some later release N+X we remove the old one. This way people don't have to throw ifdefs everywhere.
@tibbe Not sure if you meant that, but since you brought in ifdef
s, I may clarify:
The Haskell types backward compat isn't broken by this, the included #ifdef
s take care of that.
It's the "dynamic" names of the fileds (e.g. rts.gc.current_bytes_used
vs rts.gc.live_bytes
) that may, at runtime, break those that rely on these names (for example the ekg
UI's JS, which I'm fixing currently).
(Don't merge yet, I noticed that the haddocks also have the old names to be updated, I still need to do that.)
(Don't merge yet, I noticed that the haddocks also have the old names to be updated, I still need to do that.)
I have reworked the haddocks now, please see the amended commit.
There is currently a naming mismatch between EKG and
GHC.Stats
.For example, we have
so
current_bytes_used = gcdetails_live_bytes
.This is due to the 2 years old GHC commit https://github.com/ghc/ghc/commit/24e6594cc7890babe69b8ba122d171affabad2d1#diff-00007a115377c1a1c96e619128dcb206L236 which did this rename.
Should EKG eventually follow the new naming?
It's weird when some stats have the same names as their GHC.Stats counterparts, but others don't.