• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rm-hull / jasengo / 30310472180
78%

Build:
DEFAULT BRANCH: main
Ran 27 Jul 2026 10:22PM UTC
Jobs 1
Files 8
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

27 Jul 2026 10:22PM UTC coverage: 80.101% (-0.5%) from 80.612%
30310472180

push

github

web-flow
perf: Reduce string and slice allocations (#21) (#27)

* Add comprehensive benchmark test suite for performance analysis

Add benchmark tests covering:
- Reader operations (Read, Checkpoint, Rollback, Slice, Remaining)
- Basic parsers (Char, Digit, Satisfy, OneOf, Whitespace, StringP)
- Combinators (Many, Many1, Choice, Map, Bind, Sequence, Optional, SepBy, ChainL)
- Regex parsing (simple and complex patterns)
- Buffer operations (RingBuffer and UnboundedBuffer write/read/slice)
- Location tracking overhead
- Error creation and pickBestError
- Integration tests (syslog parsing, arithmetic expression evaluation)

These benchmarks establish baseline performance metrics for identifying
and measuring the impact of future optimizations.

* Add benchmark workflow to CI

Add a benchmark job to the build workflow that:
- Runs all benchmarks across parser, buffer, and parser_test packages
- Stores results using benchmark-action/github-action-benchmark
- Generates charts for tracking performance over time
- Comments on PRs with benchmark results
- Alerts on significant performance regressions (150% threshold)

This mirrors the benchmark workflow from the dot-block project.

* Fix errcheck lint errors in benchmark tests

- Add explicit error handling for Read/Rollback calls in benchmarks
- Add explicit return value handling for parser.Run calls
- Add explicit return value handling for pickBestError calls

* Update benchmarks to use b.Loop() (Go 1.24+)

Replace traditional for i := 0; i < b.N; i++ loops with b.Loop() for:
- Better timer management (automatic reset on first call, stop on exit)
- More robust benchmark execution
- Alignment with modern Go benchmarking practices

Files updated:
- internal/buffer/bench_test.go
- parser/bench_test.go
- parser_test/bench_test.go

* Remove redundant b.ResetTimer() calls

b.Loop() automatically resets the timer on first call, making explicit
b.ResetTimer() calls before the loop redundant. Removed from all benchmarks
that ... (continued)

2 of 7 new or added lines in 1 file covered. (28.57%)

1 existing line in 1 file now uncovered.

475 of 593 relevant lines covered (80.1%)

174704.44 hits per line

Uncovered Changes

Lines Coverage ∆ File
5
76.73
-0.91% parser/combinators.go

Coverage Regressions

Lines Coverage ∆ File
1
76.73
-0.91% parser/combinators.go
Jobs
ID Job ID Ran Files Coverage
1 30310472180.1 27 Jul 2026 10:22PM UTC 8
80.1
GitHub Action Run
Source Files on build 30310472180
  • Tree
  • List 8
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • e627daa8 on github
  • Prev Build on main (#30308897371)
  • Next Build on main (#30313152655)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc