<@U02KAN6061E>: re: `py-spy` profiling: it basical...
# development
w
@bitter-ability-32190: re:
py-spy
profiling: it basically looks like: 1. launching
pantsd
with something simple like
help
2. attaching with:
Copy code
py-spy record -p $pid -f speedscope -o $outputfile
3. running the relevant command 4. opening it in https://www.speedscope.app/
b
Right. I wrote the docs on using py-spy šŸ˜…
w
hah, whoops.
b
I was wondering what it looks like today, without having to run it myself
w
ah. sure.
iā€™ll grab something from
main
. but the short answer is:
Target
construction and validation is next up, afaict
(keeping in mind that
py-spy
is blind to the rust side of thingsā€¦ but the majority of time according to Instruments is in python code, so)
f
This Josh appreciates that, as I'm trying to profile something myself šŸ˜…
w
@bitter-ability-32190: for
./pants dependencies ::
in
pantsbuild/pants
after #16160: left-heavy view in thread 5, 8, 9, and 10 is most interesting
@flat-zoo-31952: yea, interested in anything you grab! weā€™ve found you 19% and 12% so far. but nothing algorithmic so far.
f
ah i missed the thread view, that explains the time thing
w
@flat-zoo-31952: the whole thing is partitioned by thread, in the very top middle of the screen. so each view shows you a single thread at a time, and wonā€™t show you the portions where the thread was unused/idle
coke
yea. and the ā€œLeft-Heavyā€ view shows you callsites as a fraction, which is more interesting for ā€œoverheadsā€
in theory Time Order would be good for algorithmic stuff, but weā€™re so async that it doesnā€™t tend to show much.
whoooa. so. right off the bat in your profile: all of the worker threads are spending ~85% of their time in
find_owners
/
matches_filespec
i have a theory
f
awesome