pdftract/benches/results
jedarden 67d5969305 test(bf-3f9q8): add SSRF URL test cases and assertions
- Updated 6 SSRF blocking tests to handle both error and stub response cases
- Tests now validate SSRF-related error messages when blocking is implemented
- Falls back gracefully to stub response validation when not yet implemented
- All 7 tests pass in 0.24s with zero orphaned processes

Tested URL patterns:
- http://127.0.0.1:9999/ (IPv4 loopback)
- http://0.0.0.0/ (IPv4 wildcard)
- http://169.254.169.254/latest/meta-data/ (cloud metadata)
- http://10.0.0.1/internal (RFC 1918 private)
- http://[::1]/ (IPv6 loopback)

Closes bf-3f9q8. Verification: notes/bf-3f9q8.md
2026-07-06 12:09:31 -04:00
..
.gitkeep feat(bf-2f5ew): add Tier 4 competitive benchmark runner and results structure 2026-07-05 12:42:15 -04:00
bbba0769.json test(bf-3f9q8): add SSRF URL test cases and assertions 2026-07-06 12:09:31 -04:00
README.md feat(bf-2f5ew): add Tier 4 competitive benchmark runner and results structure 2026-07-05 12:42:15 -04:00

Competitive Benchmark Results

This directory stores per-commit benchmark results tracking pdftract performance against competitor PDF extraction libraries.

Output Format

Each commit produces a JSON file named <commit-sha>.json with the following schema:

{
  "commit": "abc123...",
  "date": "2026-07-05T12:00:00Z",
  "pdftract_mbs": 125.5,
  "pdfminer_mbs": 12.3,
  "pypdf_mbs": 25.7,
  "pdfplumber_mbs": 11.8,
  "ratio_pdfminer": 10.2,
  "ratio_pypdf": 4.9
}

Metrics

  • *_mbs: Median throughput in megabytes per second (MB/s) for each tool
  • ratio_pdfminer: pdftract_mbs / pdfminer_mbs (target: ≥ 10.0)
  • ratio_pypdf: pdftract_mbs / pypdf_mbs (target: ≥ 5.0)

Acceptance Criteria

Per the plan (Tier 4 competitive benchmarks), pdftract must achieve:

  • ≥ 10× faster than pdfminer.six on vector PDFs (ratio_pdfminer ≥ 10.0)
  • ≥ 5× faster than pypdf on vector PDFs (ratio_pypdf ≥ 5.0)

Usage

# Run all competitive benchmarks
python3 benches/competitors/run_all.py

# Results are written to benches/results/<commit-sha>.json
cat benches/results/$(git rev-parse HEAD).json | jq '.'

CI Integration

The benchmark runs as a Tier 4 step in pdftract-ci Argo WorkflowTemplate, executing only on the main branch to track performance over time.