jtpio/jupyterlab-system-monitor

CPU meter does not show if the first CPU measurement fails

rvanbuijtenen opened this issue · 1 comments

Hello,

First of all: thank you for this dependency, it is a really useful tool to add to our online Jupyterhub environment. However, i've noticed a small issue with the CPU monitoring. I have enabled it, and it works fine most of the time. However, sometimes after starting a new pod the CPU measurement doesn't show up. A reload always fixes this, and the issue only occurs when i run the image on a kubernetes cluster. If i run it locally, the CPU measurement always shows up.

I suspect it has something to do with a CPU measurement failing for the first few seconds (i noticed a check to see if the first measurement returns 'undefined' in order to decide if CPU should be shown or not). Is it possible to add some fault tolerance to this by retrying this check for first measurement, let's say 3 or 5 times, once every refresh_rate seconds?

I might be able to create a pull request later today, if you agree this would be a useful addition. Note: i only started using this plugin yesterday, so if anyone with more knowledge has any ideas about what could cause this i would love to hear them

Kind regards,
rvanbuijtenen

jtpio commented

Closing as jupyterlab-system-monitor has now been integrated in jupyter-resource-usage: jupyter-server/jupyter-resource-usage#191

Feel free to open a new issue on the jupyter-resource-usage repo if needed: https://github.com/jupyter-server/jupyter-resource-usage

Thanks!