Commit 9dc5609
authored
Add criterion benchmarks and live throughput bench script (#3)
* Add criterion benchmarks and live throughput bench script
- Add lib.rs to expose modules for external benchmarking
- Criterion benchmarks for crypto (md4, sha256, hmac_md5, hmac_sha256,
hex_encode) and protocol (header encode/decode, frame_packet,
build_request, decode responses, parse_directory_entries, NtStatus)
- Live throughput script (scripts/bench-live.sh): single-file write/read
at 1MB-1GB, multi-file writes, ~10GB total data volume
- Makefile targets: make bench, make bench-live
* Add pre-PR checklist to CLAUDE.md, fix clippy warnings
- Document fmt/clippy/rustdoc/test checks to run before creating PRs
- Add Default impls for MultipartStore and XmlWriter (clippy::new_without_default)
* Address PR #3 review comments
- Add --locked to bench and bench-live build commands
- Use /dev/zero instead of /dev/urandom to avoid RNG bottleneck
- Remove unused human_size function
- Fix aggregate totals and use MiB units consistently
- Update script header with actual dependencies
- Pre-allocate buffers outside b.iter in protocol benchmarks
- Use typed enums (DesiredAccess, ShareAccess, etc.) instead of raw constants
* Run criterion benchmarks in CI
* Address PR #3 review comments (round 2)
- Wrap all benchmark return values in black_box to prevent elision
- CI: compile-check benchmarks (--no-run) instead of running them1 parent e989c6c commit 9dc5609
12 files changed
Lines changed: 953 additions & 8 deletions
File tree
- .github/workflows
- benches
- scripts
- src
- s3
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
83 | 86 | | |
84 | 87 | | |
85 | 88 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
27 | 45 | | |
28 | 46 | | |
29 | 47 | | |
| |||
0 commit comments