-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warn for low sample counts #318
Comments
OK, I implemented this in #321. Pretty simple implementation, but I made one small modification: instead of warning on the number of stacks, it warns on the total number of samples. I could see this being improved slightly by also warning in the SVG: this could be done by modifying |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just posting this idea before I forget it. The first thing I look at in a CPU flame graph is the sample count, as if it's low (e.g., <100) then something likely went wrong based on the common frequency of CPU profiling. This happens when the workload stops but the end user doesn't realize it, and they create a flame graph of an idle system by mistake, but still don't realize it and spend time examining idle initialization and kernel code paths.
The idea is to at least print a warning during flame graph generation about low sample counts, e.g., using the warn function:
Maybe it should be visible in the SVG too? Would have to play with it to see. Note that not all flame graphs are CPU stack samples, some are time based where it's more plausible to have fewer than 100 unique stacks. Maybe we can tell the two apart by seeing if --countname option was used.
The text was updated successfully, but these errors were encountered: