DuskSystems / wayfind

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

Add tracing feature #169

Open CathalMullan opened 1 day ago

CathalMullan commented 1 day ago

Pretty unintrusive of a feature to add.

Before merging, I'd like to see the performance cost through Codspeed of enabling this. I imagine it would be quite high - as such, maybe mention this is only to be used for debugging, rather than general purpose usage. e.g. enable tracing, but set logging to error, see impact.

EDIT: On reflection - maybe just focus on the search logic for now.

codecov[bot] commented 1 day ago

Codecov Report

Attention: Patch coverage is 67.51055% with 77 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/parser.rs 5.08% 34 Missing and 22 partials :warning:
src/router.rs 84.37% 13 Missing and 2 partials :warning:
src/node/search.rs 92.10% 3 Missing :warning:
src/path.rs 25.00% 3 Missing :warning:
Files with missing lines Coverage Δ
src/node/insert.rs 95.01% <100.00%> (+0.79%) :arrow_up:
src/node/search.rs 80.83% <92.10%> (+1.63%) :arrow_up:
src/path.rs 85.71% <25.00%> (-14.29%) :arrow_down:
src/router.rs 88.70% <84.37%> (+3.07%) :arrow_up:
src/parser.rs 78.08% <5.08%> (-20.79%) :arrow_down:
codspeed-hq[bot] commented 1 day ago

CodSpeed Performance Report

Merging #169 will not alter performance

Comparing 168-add-tracing-support-as-an-optional-feature (6f71015) with main (f05f661)

Summary

✅ 19 untouched benchmarks