benchmark: remove xxh64 and crc32 benchmarking

Likely we will use them less or not at all in future.
This commit is contained in:
Thomas Waldmann 2026-05-28 18:56:47 +02:00
parent 53b48f0940
commit 9e408a9b3a
No known key found for this signature in database
GPG key ID: 243ACFA951F78E01
2 changed files with 1 additions and 18 deletions

View file

@ -213,22 +213,6 @@ class BenchmarkMixIn:
else:
print(f"{spec:<24} {format_file_size(size):<10} {dt:.3f}s")
from xxhash import xxh64
from zlib import crc32
if not args.json:
print("Non-cryptographic checksums / hashes ===========================")
else:
result["checksums"] = []
size = 1000000000
tests = [("xxh64", lambda: xxh64(random_10M).digest()), ("crc32 (zlib)", lambda: crc32(random_10M))]
for spec, func in tests:
dt = timeit(func, number=number_default)
if args.json:
result["checksums"].append({"algo": spec, "size": size, "time": dt})
else:
print(f"{spec:<24} {format_file_size(size):<10} {dt:.3f}s")
from ..crypto.low_level import hmac_sha256, blake2b_256
if not args.json:

View file

@ -50,7 +50,6 @@ def test_benchmark_cpu(archiver, monkeypatch):
output = cmd(archiver, "benchmark", "cpu")
# verify all section headers appear in the plain-text output
assert "Chunkers" in output
assert "Non-cryptographic checksums / hashes" in output
assert "Cryptographic hashes / MACs" in output
assert "Encryption" in output
assert "Compression" in output
@ -63,7 +62,7 @@ def test_benchmark_cpu_json(archiver, monkeypatch):
result = json.loads(output)
assert isinstance(result, dict)
# categories with "size" field (bytes)
for category in ["chunkers", "checksums", "hashes", "encryption"]:
for category in ["chunkers", "hashes", "encryption"]:
assert isinstance(result[category], list)
assert len(result[category]) > 0
for entry in result[category]: