topolarity / Tracy.jl

A convenient interface for using Tracy from within Julia code
MIT License
29 stars 3 forks source link

Add performance benchmark #16

Open topolarity opened 1 year ago

topolarity commented 1 year ago

Now that we have a test that can create zones and inspect the resulting profile, we should add some tests for profiling overhead.

I'm thinking to start:

  1. A single empty zone test to see what minimal time we can get Tracy to report
  2. A repeated zone test that rapidly fires ~10,000 events and measures some statistics on the timings

To ground those measurements, we should probably also have a C file (or LLVM IR that we can feed straight to the JIT) that implements the same test sequences in C. For rdtsc and environmental reasons we might want these tests turned off for CI, but I still think they'll be useful when making changes locally.

KristofferC commented 1 year ago

Looking at the generated code might also be of use here since it should make it somewhat obvious if we are adding a bunch of overhead there. We shouldn't need to have any worse codegen than a C implementation, I think.