https://pantsbuild.org/ logo
#development
Title
# development
w

wide-midnight-78598

09/20/2022, 2:54 PM
I'm not very familiar with
py-spy
, but is there a way to profile just steps relevant to a backend? I don't really have a technical definition of "relevant" unfortunately, more of a semantic one. Like, would monitoring time spent in the
cc
module be practically good enough? Feels so-so https://www.pantsbuild.org/docs/contributions-debugging#profiling-with-py-spy Idea here is that I want to test having the
cc
backend compile/link natively vs creating Ninja build files, and then having ninja perform the compilation/linking step to see whether that step is a bottleneck (when compared with the other Pants overhead - digests, daemon, dep inference, cache checking, etc).
f

fast-nail-55400

09/20/2022, 4:07 PM
You should be able to download a Zipkin trace of a build from Toolchain Buildsense.
w

wide-midnight-78598

09/20/2022, 4:17 PM
If I just compile one of my random projects?
f

fast-nail-55400

09/20/2022, 4:42 PM
the project would have to be uploading telemetry to buildsense
but yes, there is a zipkin download link on every build
w

wide-midnight-78598

09/20/2022, 4:45 PM
šŸ‘ Need to make a decent OSS app I guess
f

fast-nail-55400

09/20/2022, 4:48 PM
There has been value in having
example-FOO
repositories for the other backends. I imagine that an
example-cc
repo will help now with testing and later with adoption.
w

wide-midnight-78598

09/20/2022, 4:49 PM
For sure, just in my case, it needs to be BIIIIG to test. I think a kitchen sink repo would be great, everything in one monorepo
f

fast-nail-55400

09/20/2022, 5:06 PM
yeah big repos help out. When we were developing the Java backend, we ended up using the Google Guice repository to test out how well dependency inference was working. Having a non-trivial (but not too complex) repository as a test case was very useful.
(and for Scala we used
cats-effect
for testing)
both were sufficiently sized in my view
I'll try to think of some good sized repositories. I wonder if there are some components of
boost
that could make for good test cases.
w

wide-midnight-78598

09/20/2022, 5:15 PM
LLVM or Chrome šŸ™‚
I have a couple in the pocket, it'll also test out how good my CMake tailor thing is...
f

fast-nail-55400

09/20/2022, 5:31 PM
LLVM would be quite a test case. :) Iā€™d suggest limiting the size of the initial test case though since we tried with Java and Scala to use larger repos, but found that repo-specific integration issues could end up dominating the amount of time needed to make it a viable test case.