swift-benchmark
swift-benchmark copied to clipboard
Report os_signposts on Darwin, split warmup reporting
This PR does 2 things:
- 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)
- Adds
os_signpost
reporting on platforms whereOSLog
is available, so Instruments can show which benchmark is running at which time, and similarly split that in to warmup/benchmark sections:
![image](https://user-images.githubusercontent.com/5254025/153101219-71867ace-1b52-4939-bbf6-48f652bef862.png)
![image](https://user-images.githubusercontent.com/5254025/153101380-5d00aa8c-1796-44be-9baa-06f879c91715.png)
Ping @compnerd @shabalind
Would you mind triggering the tests and reviewing? Whenever you get a chance, no rush. Thanks.
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.
Hi @karwa, any updates on splitting this change as requested by @compnerd earlier in this thread?