swift-benchmark icon indicating copy to clipboard operation
swift-benchmark copied to clipboard

Report os_signposts on Darwin, split warmup reporting

Open karwa opened this issue 2 years ago • 3 comments

This PR does 2 things:

  1. Splits warmup reporting, if warmup iterations are specified:
karl@Karls-MBP Benchmarks % ./.build/release/WebURLBenchmark --filter "Foundation" --warmup-iterations 20000
Warming up... Running FoundationCompat.ToWeb: AverageURLs... Done! (3944.60 ms)
Warming up... Running FoundationCompat.ToWeb: IPv4... Done! (4075.08 ms)
Warming up... Running FoundationCompat.ToWeb: IPv6... Done! (3421.14 ms)

karl@Karls-MBP Benchmarks % ./.build/release/WebURLBenchmark --filter "Foundation"                          
Running FoundationCompat.ToWeb: AverageURLs... Done! (1496.40 ms)
Running FoundationCompat.ToWeb: IPv4... Done! (2351.41 ms)
Running FoundationCompat.ToWeb: IPv6... Done! (1448.58 ms)
  1. Adds os_signpost reporting on platforms where OSLog is available, so Instruments can show which benchmark is running at which time, and similarly split that in to warmup/benchmark sections:
image image

karwa avatar Feb 09 '22 00:02 karwa

Ping @compnerd @shabalind

Would you mind triggering the tests and reviewing? Whenever you get a chance, no rush. Thanks.

karwa avatar Feb 09 '22 20:02 karwa

Would you mind splitting this up into two separate changes? Addition of the signposts should be simple and straight forward, and then we can look at the structural changes for the split warmup separately.

compnerd avatar Feb 11 '22 22:02 compnerd

Hi @karwa, any updates on splitting this change as requested by @compnerd earlier in this thread?

shabalind avatar May 10 '22 10:05 shabalind