Skip to content

Benchmark ​

This document records a robustness benchmark of the Kura engine (BentoPDF Kura Engine (kura) 1.1.0) on 30,677 real PDFs from public corpora, on Darwin arm64, Apple M4. Every file was converted to PDF/A-2b with the CLI exactly as shipped, one process per file, with the default 120-second watchdog. The raw per-file data is in bench/RESULTS.csv; every document's origin and SHA-256 are in bench/MANIFEST.csv, so the run can be reproduced with make bench from a checkout of the repository.

What is measured ​

A conversion engine that takes untrusted files has two ways to fail badly: it can crash or hang, and it can write a file that claims a standard it does not meet. So each run is graded on four outcomes, in order of severity:

  • crash: the process died or produced no report. This is the number that matters most, and the target is zero.
  • timeout: the watchdog fired. A hang is a crash that has not happened yet.
  • rejected: the engine refused with an error code and a reason. A password-protected or unparseable file is supposed to land here; it is not a failure of the engine, and the code says why.
  • converted: a conforming file was written. A fixed one-in-ten sample of these outputs is validated independently with veraPDF, the reference validator for the standard, and the pass rate is reported.

Conversion is the hardest path through the engine: it parses, repairs, embeds, converts colour, rebuilds metadata and serializes, so it exercises far more code than a check does.

Corpora ​

tranchesourcefileswhat it stresses
pdfjsThe pdf.js regression corpus966the test files the pdf.js viewer project has collected from bug reports: broken cross-reference tables, exotic fonts, damaged streams
ccWeb PDFs, Common Crawl CC-MAIN-2021-311,927PDFs as they sit on the open web, fetched straight from the July 2021 crawl archive: every producer, every era, every state of repair
safedocsWeb PDFs, DARPA SafeDocs CC-MAIN-2021-3127,784a sample of the 7.9 million PDFs crawled from the open web in 2021 and archived by DARPA SafeDocs, in every state of repair

The web sample is pre-registered: the Common Crawl CC-MAIN-2021-31 index was read directly from its published shards, taking index blocks at a fixed stride under ten top-level domain prefixes (gov, edu, org, com, uk, de, fr, jp, au, ca), every record in those blocks served as PDF with HTTP status 200 and an archive record of at most 512 KB, in index order until each prefix had its share, and nothing was excluded afterwards. Each file's archive locator is in MANIFEST.csv, so the exact bytes can be fetched again. The SafeDocs sample is pre-registered: zip files 0000 to 0999 of the corpus were taken at a fixed stride of 20, and inside each chosen zip every PDF member of at most 512 KB was taken in directory order until the target was reached; nothing was excluded afterwards. Each file's origin names the zip and the member, so the exact bytes can be fetched again. The pdf.js files are the complete set of PDFs checked into that project's test directory, nothing excluded.

Results ​

tranchefilesconvertedrejectedtimeoutscrashesverified samplemedian timep95 time
pdfjs966938280086/940.02 s0.1 s
cc1,9271,922500189/1930.06 s0.2 s
safedocs27,78427,576208002,760/2,7790.05 s0.1 s
all30,67730,436241003,035/3,0660.05 s0.1 s

Why files were rejected ​

codemeaningfiles
FONT_UNEMBEDDABLEa font whose licence forbids embedding, so no conforming file can be written139
PARSE_ERRORnot a parseable PDF72
PASSWORD_REQUIREDneeds a password30

Verified sample: files that did not pass veraPDF ​

tranchefile
pdfjsType3WordSpacing.pdf
pdfjscalrgb.pdf
pdfjsissue14881.pdf
pdfjsissue215.pdf
pdfjsissue5334.pdf
pdfjsissue6894.pdf
pdfjsissue9262_reduced.pdf
pdfjstext_clip_cff_cid.pdf
cccc-00190-3vgmig42by.pdf
cccc-00350-knsowcrdt4.pdf
cccc-01554-w4lwjdh6oy.pdf
cccc-01645-vjp5mj3f7v.pdf
safedocs0000-0000626.pdf
safedocs0020-0020305.pdf
safedocs0020-0020810.pdf
safedocs0100-0100813.pdf
safedocs0140-0140581.pdf
safedocs0220-0220947.pdf
safedocs0280-0280207.pdf
safedocs0280-0280830.pdf
safedocs0320-0320533.pdf
safedocs0360-0360000.pdf
safedocs0360-0360414.pdf
safedocs0380-0380235.pdf
safedocs0460-0460932.pdf
safedocs0520-0520046.pdf
safedocs0640-0640324.pdf
safedocs0640-0640892.pdf
safedocs0680-0680518.pdf
safedocs0720-0720465.pdf

Appendix: every document tested ​

The per-file lists are split into parts of up to 2,000 rows so they stay readable on GitHub. Each row gives the file, its page count, its size, the outcome and where it came from.

Dual-licensed under AGPL-3.0 and Commercial License.