Skip to content

Benchmarks

These are the token savings LogStrip measures on its own test fixtures. We publish every row, including the weak ones, and we say what the numbers can and cannot tell you. The table is generated from the parser, not typed by hand.

  • Fixtures: 51
  • Lines: 4,433 in, 1,922 out
  • Tokens: 42,705 in, 20,805 out, 51.3% saved
  • Per-fixture savings: median 42.0%, lowest 16.7%, highest 87.2%
  • Measured with LogStrip 1.12.0

Savings are 1 - output tokens / input tokens. A fixture that goes from 284 tokens to 63 saves 77.8%.

  • Fixtures. Every tests/fixtures/*.log file in the repository, 50 in all. They are small, written by us, and covered by committed snapshot tests. None is a production log.
  • Run. Each fixture goes through the parser once with default options, the same as logstrip <file>. No flags, no tuning per fixture.
  • Tokens. LogStrip’s own estimate: whitespace-separated words times 1.3. It is the number --stats prints. It is not a model tokenizer, so real counts differ by model. Lines full of paths, hashes and identifiers usually cost more real tokens than the estimate says.
  • Deterministic. The same fixtures and the same parser give the same table. The page holds no timings, because those depend on the machine.

Two groups. Single-tool logs are one tool and one failure story, which is closest to what you paste into a chat. Multi-tool samples mix a few lines from many tools. We wrote them to test source detection, so they hold little repetition to fold.

GroupFixturesInput tokensOutput tokensSavingsMedian per fixture
Single-tool logs256,6723,24551.4%44.2%
Multi-tool samples2636,03317,56051.3%41.8%
  • Chatter compresses best. The top of the table is logs that are mostly INFO and DEBUG lines, download progress, or passing tests around one failure: apache-httpd-noisy, docker-build, jest-noisy, maven-downloads-failure. Those lines carry little diagnostic value, and the error is a small share of the file.
  • Failure-only logs compress least. kubernetes-crashloop is a few routine events followed by warnings and a panic with its stack, so there is little to drop. Short logs where most lines are errors, such as server-json, behave the same way. LogStrip keeps what carries a diagnosis, and here that is most of the file.
  • Repeats pay off when they exist. Folding [xN], hiding internal library frames and referencing repeated blocks only help when a log repeats itself. The fixtures are short, so they show less of this than a log with thousands of identical retries would.
  • Multi-tool samples sit in the middle. One or two lines per tool means few duplicates. Savings come mostly from dropping routine levels.
  • One fixture dominates the token totals. all-sources-detection is more than half of all input tokens, so the overall figure leans on it. The median per fixture is the more honest single number.
  • They are not a promise for your logs. A 50,000-line CI log can save more or less than a 40-line fixture. Run --stats on yours.
  • They do not measure answer quality. We count tokens, not whether an agent diagnoses the failure faster. The design goal is to keep the diagnostic lines, and the snapshot tests pin what is kept, but that is not a quality benchmark.
  • They do not compare tools. We did not run other compressors on these fixtures. See Compare for what we can say about each category without inventing numbers.
  • The estimate is rough. If you need exact token counts, pass your own tokenizer through the tokenEstimator option of the library.

Sorted by savings, best first.

FixtureGroupLines in / outInput tokensOutput tokensSavings
apache-httpd-noisySingle-tool30 / 44856287.2%
docker-buildSingle-tool26 / 43096479.3%
jest-noisySingle-tool47 / 82846377.8%
maven-downloads-failureSingle-tool13 / 31243274.2%
java-spring-boot-realisticSingle-tool25 / 103059568.8%
vitest-failureSingle-tool43 / 142579164.6%
python-worker-loggingSingle-tool28 / 1437915459.4%
go-logfmt-serviceSingle-tool15 / 51636758.9%
ci-platformsMulti-tool57 / 2453722857.5%
all-sources-detectionMulti-tool2,115 / 70523,35510,30355.9%
cloud-serverlessMulti-tool32 / 1239217555.4%
go-test-verboseSingle-tool18 / 9823952.4%
terraform-ansible-systemdMulti-tool41 / 1645421652.4%
data-search-analyticsMulti-tool147 / 651,16756551.6%
json-test-reportSingle-tool165 / 1061,04450551.6%
go-rust-ruby-frameworksMulti-tool74 / 3658329749.1%
pytest-failureSingle-tool36 / 1629314949.1%
maven-failureSingle-tool41 / 1528614947.9%
java-enterpriseMulti-tool47 / 2633818146.5%
build-toolchainsMulti-tool70 / 3859533244.2%
node-crash-realisticSingle-tool24 / 1318110144.2%
auth-secrets-configMulti-tool64 / 3557832943.1%
ecosystem-signals-realisticMulti-tool44 / 2741523842.6%
mocha-spec-failureSingle-tool45 / 2423613642.4%
email-ci-infraMulti-tool89 / 4873842742.1%
backup-docs-messagingMulti-tool95 / 5078345442.0%
observability-analyticsMulti-tool71 / 3858033741.9%
data-telemetry-scannersMulti-tool23 / 1121112341.7%
ai-ml-ecosystemMulti-tool62 / 3752831141.1%
pino-bunyan-numericSingle-tool12 / 4824940.2%
networking-edge-serverlessMulti-tool54 / 3245727539.8%
python-lint-asyncMulti-tool50 / 2744026639.5%
mobile-desktop-cmsMulti-tool96 / 5273945039.1%
realtime-graphqlMulti-tool53 / 3043326838.1%
nginx-access-noisySingle-tool16 / 1038023637.9%
orm-db-migrationsMulti-tool65 / 3852633137.1%
security-scannersMulti-tool88 / 5766242036.6%
build-test-systemsMulti-tool48 / 3424015336.3%
polyglot-stacksSingle-tool64 / 4139024936.1%
nginx-502-burstSingle-tool11 / 625816834.9%
iot-game-embeddedMulti-tool53 / 3242728433.5%
node-repeated-stackSingle-tool29 / 1721514532.6%
web-frameworks-nodeMulti-tool60 / 3147832232.6%
infra-cloudMulti-tool16 / 718212431.9%
scanner-vulnerabilitySingle-tool12 / 81077331.8%
webpack-bundleSingle-tool27 / 2026719427.3%
secret-fieldsSingle-tool22 / 1425018824.8%
sanitize-secrets-ipv6Single-tool17 / 111027724.5%
ci-pkg-managersMulti-tool24 / 1619515122.6%
server-jsonSingle-tool11 / 7433420.9%
kubernetes-crashloopSingle-tool18 / 1515012516.7%

You need Node.js 22+ and a clone of the repository.

Terminal window
git clone https://github.com/mrwogu/logstrip
cd logstrip
npm ci
npm run build
npm run bench # per-fixture table with drop reasons and timings
npm run docs:bench # rewrites this table, the homepage numbers, the README and its badges

npm run bench accepts a name filter, for example npm run bench -- jest. npm run docs:bench -- --check exits with an error when the committed numbers are stale. CI runs it after the build, so a change to a fixture or to the parser needs npm run docs:bench in the same pull request.

To measure your own log:

Terminal window
logstrip raw.log -o clean.log --stats
  • Why LogStrip - what it keeps, what it drops, and when not to use it.
  • Compression Flow - the steps that produce these numbers.
  • Compare - LogStrip next to the other things people try.