Closed gperciva closed 2 years ago
Can you make the use of doas
conditional on id -u
? Check the uid, set DOAS, then invoke ${DOAS} instead of a hard-coded path.
That way this can be run as root on systems without (appropriately configured) doas.
We only care about stacks which include pipe_enc_thread
here, right? Can you stick a grep after stackcollapse.pl to filter out the rest?
Can you stick a grep after stackcollapse.pl to filter out the rest?
Sure, but I thought the whole point of the interactive svg was that you could click on the part that you wanted to see more details about?
I didn't want to assume that the stuff in the non-pipe_enc_thread
threads (noeintr_write
and read
) were irrelevant. I mean, if the perftest is doing what it's supposed to, then of course they're not relevant... but I wouldn't want to assume that it's perfect.
Hmm, probably best to make this an option to the shell script. Grep it out by default, but allow the user to keep everything if they want.
Updates. Now the binary can take an optional value to multiply the number of bytes to process, while the script is hard-coded to make that 10 (so it does 1 GB instead of 100 MB). Takes 7.8 seconds on my server.
Do you want the script to also allow an optional multiplier?
Looks good, just one minor nit. Please rebase.
Rebased, ready for merge.
This assumes that one has
doas(1)
set up to allow the current user to run/usr/sbin/dtrace
.Sample output:
(apparently github renders the svg in some manner, so you can't interact with that svg file in the way you normally would with a flamegraph)