Skip to content
This repository was archived by the owner on Sep 17, 2024. It is now read-only.

Conversation

@JonasBa
Copy link
Member

@JonasBa JonasBa commented Feb 8, 2023

No description provided.

@JonasBa JonasBa force-pushed the jb/profiler/eager-default branch from 98ab4b9 to 35e6b86 Compare February 8, 2023 23:44
README.md Outdated
### Environment flags flags

The default mode of the v8 CpuProfiler is kLazyLogging which disables logging when no profiles are active - this is good because it does not add any overhead to the runtime, but the tradeoff is that it results in slow calls to startProfiling (this can exceed couple hundred ms from our tests). You can switch to eager logging which decreases the startup cost for the tradeoff of CPU overhead. You can do so by defining a `SENTRY_PROFILER_LOGGING_MODE` environment variable `eager|lazy` before running your script.
The default mode of the v8 CpuProfiler is kEagerLoggins which enables the profiler even when no profiles are active - this is good because it makes calls to startProfiling fast at the tradeoff for constant CPU overhead. The behavior can be controlled via the `SENTRY_PROFILER_LOGGING_MODE` environment variable with values of `eager|lazy`. Do not that if you do opt to use the lazy logging mode calls to startProfiling may be slow (depending on environment and node version, it can be in the order of a few hundred ms).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: kEagerLoggins

@JonasBa JonasBa force-pushed the jb/profiler/eager-default branch from b55e064 to 9d18459 Compare February 9, 2023 00:01
@JonasBa JonasBa merged commit 343351d into main Feb 9, 2023
@JonasBa JonasBa deleted the jb/profiler/eager-default branch February 9, 2023 00:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants