You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Performance Issues related with high request call rates to T _host_get_clock_service #480
I have been troubleshooting a node implementation that is currently using your lib to expose prometheus metrics and using clinicJS tool notices that almost 80% of total cpu usage time is spend in T _host_get_clock_service call. Already updated lib version to 14.0.1, but issues continues to be present.
Clinic Flamechart is this one:
Looking at your source code it can be related with Date.now(); requests performed in lib/timeWindowQuantiles.js or lib/metrics/processStartTime.js.
Do you have any suggestion on how to troubleshoot these issues and try to mitigate them?
Thanks for reporting this. I'm hoping to look into this this month, but please don't let that stop anyone else from taking a look if they have time before I do.
Other than the already mentioned issues and improvements coming in v0.16, my other concern is that somehow you're getting multiple copies of prom-client loaded and what you're actually seeing here is all of them gathering their defaultMetrics, rather than the one instance attached to the scraping logic.
Activity
zbjornson commentedon Dec 1, 2021
Thanks for reporting this. I'm hoping to look into this this month, but please don't let that stop anyone else from taking a look if they have time before I do.
WIP: potential fix for #480
timofriedlberlin commentedon Nov 9, 2022
Any update on this? Due to the high resource usage of this library we cannot use it in production.
jdmarshall commentedon Aug 20, 2026
Other than the already mentioned issues and improvements coming in v0.16, my other concern is that somehow you're getting multiple copies of prom-client loaded and what you're actually seeing here is all of them gathering their defaultMetrics, rather than the one instance attached to the scraping logic.