phoenixframework / phoenix_live_dashboard

Realtime dashboard with metrics, request logging, plus storage, OS and VM insights

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reduction count per process does not match the values of the observer table

LostKobrakai opened this issue · comments

Environment

Make sure you are using the latest LiveView and Dashboard versions before continuing.

  • Elixir version (elixir -v): 1.11.4
  • Phoenix version (mix deps): 1.5.8
  • Phoenix LiveView version (mix deps): 0.15.5
  • Phoenix Dashboard version (mix deps): 0.4.0
  • Operating system: Mac OS X
  • Browsers you attempted to reproduce this bug on (the more the merrier): Firefox

Actual behavior

See the different reported values for the reduction count.

CleanShot 2021-04-27 at 13 04 32@2x

This is especially problematic for debugging as even processes doing nothing seem to continuously grow in their reduction count.

Expected behavior

Same values as in the observer.

It seems there's some kind of postprocessing done by the observer on top of the counts reported by :erlang.process_info: https://github.com/erlang/otp/blob/master/lib/observer/src/observer_pro_wx.erl#L624-L639

A PR is welcome. It seems Observer is doing a diff.

@LostKobrakai ping! Are you planning to send a PR or should we tackle it?

I had a look into it a few weeks ago, but never really fully grasped how the diffing was done. So would be great if someone understanding the differences could handle it.

I had a look into it a few weeks ago, but never really fully grasped how the diffing was done. So would be great if someone understanding the differences could handle it.

In this case, I'll try to take a look ASAP :)