Skip to content

Commit 86e201c

Browse files
committed
Clean up documentation and workflows
1 parent 77ac1a1 commit 86e201c

File tree

7 files changed

+62
-27
lines changed

7 files changed

+62
-27
lines changed

.clang-format

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ IncludeCategories:
103103
- Regex: '^<[^/]+>$'
104104
Priority: 2
105105
SortPriority: 2
106-
# 3. Third-party libraries (uni-algo, catch2, nlohmann)
107-
- Regex: '^<(uni|catch2|nlohmann)/'
106+
# 3. Third-party libraries (catch2, nlohmann)
107+
- Regex: '^<(catch2|nlohmann)/'
108108
Priority: 3
109109
SortPriority: 3
110110
# 4. Project headers (skyr/...)

.github/workflows/clang-tidy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
./bootstrap-vcpkg.sh
2929
export CXXFLAGS="-stdlib=libc++"
3030
export LDFLAGS="-stdlib=libc++ -lc++abi"
31-
./vcpkg install uni-algo nlohmann-json
31+
./vcpkg install nlohmann-json
3232
3333
- name: Install Catch2
3434
run: |

.github/workflows/sanitizers.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -115,17 +115,6 @@ jobs:
115115
git checkout -b master origin/master
116116
./bootstrap-vcpkg.sh
117117
118-
# For Clang builds, use custom triplet with libc++ and set compiler
119-
if [[ "${{ matrix.config.use_libcxx }}" == "true" ]]; then
120-
export CC=${{ matrix.config.cc }}
121-
export CXX=${{ matrix.config.cxx }}
122-
./vcpkg install uni-algo \
123-
--triplet x64-linux-libcxx \
124-
--overlay-triplets=${GITHUB_WORKSPACE}/cmake/vcpkg-triplets
125-
else
126-
./vcpkg install uni-algo
127-
fi
128-
129118
- name: Configure
130119
shell: cmake -P {0}
131120
run: |

.github/workflows/skyr-url-ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -298,11 +298,11 @@ jobs:
298298
if [[ "${{ matrix.config.cxx }}" == clang++* ]]; then
299299
export CC=${{ matrix.config.cc }}
300300
export CXX=${{ matrix.config.cxx }}
301-
./vcpkg install catch2 uni-algo nlohmann-json \
301+
./vcpkg install catch2 nlohmann-json \
302302
--triplet x64-linux-libcxx \
303303
--overlay-triplets=${GITHUB_WORKSPACE}/cmake/vcpkg-triplets
304304
else
305-
./vcpkg install catch2 uni-algo nlohmann-json
305+
./vcpkg install catch2 nlohmann-json
306306
fi
307307
308308
- name: Install LLVM Clang on macOS
@@ -338,7 +338,7 @@ jobs:
338338
git checkout -b master origin/master
339339
export
340340
./bootstrap-vcpkg.sh
341-
./vcpkg install catch2 uni-algo nlohmann-json
341+
./vcpkg install catch2 nlohmann-json
342342
343343
- name: Install vcpkg (Windows)
344344
id: vcpkg_windows
@@ -348,7 +348,7 @@ jobs:
348348
git clone https://github.com/microsoft/vcpkg.git ${Env:GITHUB_WORKSPACE}\vcpkg
349349
cd ${Env:GITHUB_WORKSPACE}\vcpkg
350350
.\bootstrap-vcpkg.bat
351-
vcpkg install catch2 uni-algo nlohmann-json --triplet x64-windows
351+
vcpkg install catch2 nlohmann-json --triplet x64-windows
352352
353353
354354
- name: Configure

.github/workflows/wpt.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
git fetch origin master
6262
git checkout -b master origin/master
6363
./bootstrap-vcpkg.sh
64-
./vcpkg install uni-algo nlohmann-json
64+
./vcpkg install nlohmann-json
6565
6666
- name: Configure
6767
shell: cmake -P {0}

CLAUDE.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,14 +295,32 @@ Performance:
295295

296296
To 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+
300303
cmake -B _build -G Ninja -Dskyr_BUILD_BENCHMARKS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo
301304
cmake --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
303312
open /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
308326
cmake -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
316336
valgrind --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

benchmark/README.md

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,23 +35,48 @@ Default: 10,000 iterations × 34 URLs = 340,000 parses
3535

3636
### macOS (with Xcode Instruments)
3737

38+
**Requires Xcode** - Install from App Store or https://developer.apple.com/download/
39+
3840
```bash
41+
# Verify Xcode tools are installed
42+
xctrace version
43+
3944
# Build with debug symbols
4045
cmake -B _build -G Ninja \
4146
-Dskyr_BUILD_BENCHMARKS=ON \
4247
-DCMAKE_BUILD_TYPE=RelWithDebInfo
4348

4449
cmake --build _build --target url_parsing_bench
4550

46-
# Profile with Instruments
47-
instruments -t "Time Profiler" \
48-
-D /tmp/url_bench.trace \
49-
./_build/benchmark/url_parsing_bench 50000
51+
# Profile with xctrace (modern replacement for 'instruments' command)
52+
xctrace record --template 'Time Profiler' \
53+
--output /tmp/url_bench.trace \
54+
--launch ./_build/benchmark/url_parsing_bench 50000
5055

51-
# Open results
56+
# Open results in Instruments GUI
5257
open /tmp/url_bench.trace
5358
```
5459

60+
### macOS (with sample - no Xcode needed)
61+
62+
**Built-in** - No installation required
63+
64+
```bash
65+
# Build with debug symbols
66+
cmake -B _build -G Ninja \
67+
-Dskyr_BUILD_BENCHMARKS=ON \
68+
-DCMAKE_BUILD_TYPE=RelWithDebInfo
69+
70+
cmake --build _build --target url_parsing_bench
71+
72+
# Profile with sample (10 second sample)
73+
sample url_parsing_bench 10 -file /tmp/profile.txt &
74+
./_build/benchmark/url_parsing_bench 50000
75+
76+
# View results
77+
open /tmp/profile.txt
78+
```
79+
5580
### Linux (with perf)
5681

5782
```bash

0 commit comments

Comments
 (0)