Skip to content

bench(deps-go): add comprehensive benchmarks for Go ecosystem#44

Merged
bug-ops merged 1 commit intomainfrom
feat/deps-go-benchmarks
Dec 26, 2025
Merged

bench(deps-go): add comprehensive benchmarks for Go ecosystem#44
bug-ops merged 1 commit intomainfrom
feat/deps-go-benchmarks

Conversation

@bug-ops
Copy link
Owner

@bug-ops bug-ops commented Dec 26, 2025

Summary

  • Add criterion benchmarks for deps-go crate covering all major operations
  • Document performance targets based on LSP latency requirements

Benchmark Coverage

Group Tests
go_mod_parsing small (5 deps), medium (25 deps), large (100 deps), complex
go_sum_parsing small, medium, large
position_tracking single require, block, replace directive
version_comparison simple, incompatible suffix, pseudo-version, find latest
pseudo_version_detection regular, pseudo, with base, incompatible, prerelease
module_path_escaping lowercase, uppercase, mixed, special chars, long path
directive_types require inline/block, replace, exclude, indirect, pseudo, incompatible
comment_handling parsing with inline and block comments
unicode_parsing Unicode in comments and module declarations
go_sum_special_cases pseudo-version, incompatible, duplicate versions

Performance Targets

From docstring:

  • Parsing small files: < 1ms
  • Parsing medium files (20-50 deps): < 5ms
  • Parsing large files (100+ deps): < 20ms
  • go.sum parsing: < 10ms for 100 entries
  • Version comparison: < 10μs per operation
  • Module path escaping: < 1μs per operation

Test plan

  • cargo build --workspace --benches passes
  • CI benchmark build check passes
  • Run cargo bench -p deps-go to verify benchmarks execute

@github-actions github-actions bot added rust Rust code changes needs-review Needs review tests Test changes size: XL 500-1000 lines changed labels Dec 26, 2025
Add criterion benchmarks covering:
- go.mod parsing (small/medium/large files, all directives)
- go.sum lockfile parsing
- Version comparison operations
- Pseudo-version detection
- Module path escaping for proxy API
- Position tracking for LSP features
- Unicode and comment handling

Performance targets documented for LSP latency requirements.
@bug-ops bug-ops force-pushed the feat/deps-go-benchmarks branch from 58f1be1 to eefc857 Compare December 26, 2025 19:24
@codecov-commenter
Copy link

codecov-commenter commented Dec 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

Impacted file tree graph

@@           Coverage Diff           @@
##             main      #44   +/-   ##
=======================================
  Coverage   85.73%   85.73%           
=======================================
  Files          55       55           
  Lines       14642    14642           
=======================================
  Hits        12554    12554           
  Misses       2088     2088           
Flag Coverage Δ
deps-cargo 79.31% <ø> (ø)
deps-core 90.99% <ø> (ø)
deps-go 85.73% <ø> (ø)
deps-lsp 79.54% <ø> (ø)
deps-npm 89.55% <ø> (ø)
deps-pypi 86.69% <ø> (ø)
overall 85.73% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bug-ops bug-ops merged commit fbeacb2 into main Dec 26, 2025
20 checks passed
@bug-ops bug-ops deleted the feat/deps-go-benchmarks branch December 26, 2025 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-review Needs review rust Rust code changes size: XL 500-1000 lines changed tests Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants