Tarsnap / spiped

Spiped is a utility for creating symmetrically encrypted and authenticated pipes between socket addresses.
http://www.tarsnap.com/spiped.html
Other
858 stars 56 forks source link

perftests/standalone-enc: add dtrace flamegraph script #344

Closed gperciva closed 2 years ago

gperciva commented 2 years ago

This assumes that one has doas(1) set up to allow the current user to run /usr/sbin/dtrace.

Sample output:

bench

(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)

cperciva commented 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.

cperciva commented 2 years ago

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?

gperciva commented 2 years ago

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.

gperciva commented 2 years ago

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?

cperciva commented 2 years ago

Looks good, just one minor nit. Please rebase.

gperciva commented 2 years ago

Rebased, ready for merge.