benboit
CDCloudflare Developers
•Created by benboit on 7/19/2023 in #workers-help
Measure time needed within workers (profiling)
Hello, in order to improve the performance of our software, we would like to gather metrics for specific processes ran in our worker.
Since workers use a different handling for the time / date value (spectre protection as far as i remember), we can't simply use functions like performance.now().
I learned from a thread i started in #analytics (https://discord.com/channels/595317990191398933/1115387663982276648/1131126277215092778) time is updated on async operations.
We would like to gather the time needed for execution of query-resolvers on graphql as well as rendering of specific react components on SSR. Analytics-Engine seems to be the best match for gathering.
Any functions im not aware of, which could be used for measuring time-needed?
3 replies