feat: bump bgpkit-parser to 0.18.0, use route-level iterator - #14
Merged
Conversation
- Switch parse_rib_file from full BgpElem to into_route_iter() 19% faster on RIPE RIS bview files; larger gains on full RIB dumps - Eliminate per-path as_path.clone() by borrowing via Arc - Bump bgpkit-broker 0.7.5 → 0.11.0 (new collectors, SDK caching) - bgpkit-parser requires features = ["local"] for BgpkitParser::new(url) - Update changelog with both PR #13 (collector output) and parser bump
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Bumps bgpkit-parser to 0.18.0 and switches to the route-level iterator (
into_route_iter()) for faster RIB parsing. Also bumps bgpkit-broker to 0.11.0.Changes
parse_rib_filenow usesBgpkitParser::new(url)?.into_route_iter()instead of full BgpElem iterationBgpRouteElemprovides all fields peer-stats needs:peer_ip,peer_asn,prefix,as_pathArc<AsPath>— borrowed instead of cloned, eliminating per-path allocationfeatures = ["local"]needed forBgpkitParser::new(url)(oneio decoupled from parser in v0.12)bgpkit-broker 0.7.5 → 0.11.0: adds collectors locix.fra, ixpn.lagos, decix.fra, crix.sjo
Performance
BgpElem)into_route_iter)18.9% faster on bview files. Release notes claim 50–70% on full RIB dumps.
Changelog
Updated with both this PR and the previous collector-output PR (#13).
Verified
cargo fmt✓cargo clippy --all-features -- -D warnings✓cargo test(all 11 tests) ✓cargo test test_read_rib --release✓