@@ -295,14 +295,32 @@ Performance:
295295
296296To find actual performance bottlenecks, use profiling tools:
297297
298- ** macOS (Instruments):**
298+ ** macOS (Instruments - requires Xcode ):**
299299``` bash
300+ # First, install Xcode from App Store or https://developer.apple.com/download/
301+ # Verify: xctrace version
302+
300303cmake -B _build -G Ninja -Dskyr_BUILD_BENCHMARKS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo
301304cmake --build _build --target url_parsing_bench
302- instruments -t " Time Profiler" -D /tmp/url_bench.trace ./_build/benchmark/url_parsing_bench 50000
305+
306+ # Profile with xctrace (modern replacement for 'instruments' command)
307+ xctrace record --template ' Time Profiler' \
308+ --output /tmp/url_bench.trace \
309+ --launch ./_build/benchmark/url_parsing_bench 50000
310+
311+ # Open results in Instruments GUI
303312open /tmp/url_bench.trace
304313```
305314
315+ ** macOS (sample - built-in, no Xcode needed):**
316+ ``` bash
317+ cmake -B _build -G Ninja -Dskyr_BUILD_BENCHMARKS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo
318+ cmake --build _build --target url_parsing_bench
319+ sample url_parsing_bench 10 -file /tmp/profile.txt &
320+ ./_build/benchmark/url_parsing_bench 50000
321+ open /tmp/profile.txt
322+ ```
323+
306324** Linux (perf):**
307325``` bash
308326cmake -B _build -G Ninja -Dskyr_BUILD_BENCHMARKS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo
@@ -313,8 +331,11 @@ perf report
313331
314332** All platforms (Valgrind):**
315333``` bash
334+ cmake -B _build -G Ninja -Dskyr_BUILD_BENCHMARKS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo
335+ cmake --build _build --target url_parsing_bench
316336valgrind --tool=callgrind ./_build/benchmark/url_parsing_bench 1000
317- qcachegrind callgrind.out # or kcachegrind on Linux
337+ qcachegrind callgrind.out # macOS: brew install qcachegrind
338+ # Linux: kcachegrind
318339```
319340
320341### Test Coverage
0 commit comments