DuskSystems / wayfind

A speedy, flexible router for Rust.
Apache License 2.0
10 stars 0 forks source link

Add GitLab-based insert/delete/display benchmarks #161

Closed CathalMullan closed 1 month ago

CathalMullan commented 1 month ago

Raw routes sourced from: https://gist.github.com/CathalMullan/23753db0a6c38b8f74fe288383670583

Can't say I'm a fan of having the CI job now take 5+ mins.

gitlab benchmarks/gitlab benchmarks/wayfind insert
                        time:   [139.51 ms 139.76 ms 140.03 ms]

gitlab benchmarks/gitlab benchmarks/wayfind delete
                        time:   [942.00 ms 943.66 ms 945.68 ms]

gitlab benchmarks/gitlab benchmarks/wayfind display
                        time:   [927.94 µs 930.40 µs 932.75 µs]

Timer precision: 41 ns
gitlab_divan        fastest       │ slowest       │ median        │ mean          │ samples │ iters
├─ wayfind delete   929 ms        │ 974.1 ms      │ 937.1 ms      │ 938.3 ms      │ 100     │ 100
│                   alloc:        │               │               │               │         │
│                     93072       │ 93072         │ 93072         │ 92141         │         │
│                     5.432 MB    │ 5.432 MB      │ 5.432 MB      │ 5.377 MB      │         │
│                   dealloc:      │               │               │               │         │
│                     100387      │ 100387        │ 100387        │ 99383         │         │
│                     7.133 MB    │ 7.133 MB      │ 7.133 MB      │ 7.062 MB      │         │
│                   grow:         │               │               │               │         │
│                     11204       │ 11204         │ 11204         │ 11091         │         │
│                     835.3 KB    │ 835.3 KB      │ 835.3 KB      │ 827 KB        │         │
├─ wayfind display  691.6 µs      │ 775.2 µs      │ 697.7 µs      │ 699.1 µs      │ 100     │ 100
│                   alloc:        │               │               │               │         │
│                     8475        │ 8475          │ 8475          │ 8475          │         │
│                     382.2 KB    │ 382.2 KB      │ 382.2 KB      │ 382.2 KB      │         │
│                   dealloc:      │               │               │               │         │
│                     8474        │ 8474          │ 8474          │ 8474          │         │
│                     579.2 KB    │ 579.2 KB      │ 579.2 KB      │ 579.2 KB      │         │
│                   grow:         │               │               │               │         │
│                     4610        │ 4610          │ 4610          │ 4610          │         │
│                     412.6 KB    │ 412.6 KB      │ 412.6 KB      │ 412.6 KB      │         │
╰─ wayfind insert   128.9 ms      │ 136.7 ms      │ 129.8 ms      │ 130.2 ms      │ 100     │ 100
                    alloc:        │               │               │               │         │
                      78788       │ 78788         │ 78788         │ 78788         │         │
                      29.93 MB    │ 29.93 MB      │ 29.93 MB      │ 29.93 MB      │         │
                    dealloc:      │               │               │               │         │
                      64663       │ 64663         │ 64663         │ 64663         │         │
                      28.48 MB    │ 28.48 MB      │ 28.48 MB      │ 28.48 MB      │         │
                    grow:         │               │               │               │         │
                      18663       │ 18663         │ 18663         │ 18663         │         │
                      1.162 MB    │ 1.162 MB      │ 1.162 MB      │ 1.162 MB      │         │

This is a good enough starting point.

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 86.36364% with 3 lines in your changes missing coverage. Please review.

:white_check_mark: All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/node/insert.rs 80.00% 1 Missing and 2 partials :warning:
Files with missing lines Coverage Δ
src/errors/insert.rs 92.85% <100.00%> (+0.40%) :arrow_up:
src/node/insert.rs 93.87% <80.00%> (+0.61%) :arrow_up:
codspeed-hq[bot] commented 1 month ago

CodSpeed Performance Report

Merging #161 will create unknown performance changes

Comparing 29-attempt-to-port-gitlab-routes-as-test (bffc6fb) with main (8c0736b)

Summary

🆕 19 new benchmarks ⁉️ 16 dropped benchmarks

:warning: Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark main 29-attempt-to-port-gitlab-routes-as-test Change
🆕 gitlab delete benchmarks/wayfind N/A 7 s N/A
🆕 gitlab display benchmarks/wayfind N/A 5 ms N/A
🆕 gitlab insert benchmarks/wayfind N/A 860.9 ms N/A
⁉️ matchit benchmarks/actix-router 185.7 µs N/A N/A
⁉️ matchit benchmarks/matchit 10.9 µs N/A N/A
⁉️ matchit benchmarks/ntex-router 31.4 µs N/A N/A
⁉️ matchit benchmarks/path-tree 13.3 µs N/A N/A
⁉️ matchit benchmarks/route-recognizer 43 µs N/A N/A
⁉️ matchit benchmarks/routefinder 54.4 µs N/A N/A
⁉️ matchit benchmarks/wayfind 13.3 µs N/A N/A
⁉️ matchit benchmarks/xitca-router 12.8 µs N/A N/A
🆕 matchit benchmarks/actix-router N/A 184.8 µs N/A
🆕 matchit benchmarks/matchit N/A 10.7 µs N/A
🆕 matchit benchmarks/ntex-router N/A 31.5 µs N/A
🆕 matchit benchmarks/path-tree N/A 13.2 µs N/A
🆕 matchit benchmarks/route-recognizer N/A 42.8 µs N/A
🆕 matchit benchmarks/routefinder N/A 54.2 µs N/A
🆕 matchit benchmarks/wayfind N/A 12.6 µs N/A
🆕 matchit benchmarks/xitca-router N/A 12.8 µs N/A
⁉️ path-tree benchmarks/actix-router 1 ms N/A N/A
... ... ... ... ...


:information_source: Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.