This commit is contained in:
2026-08-24 08:11:59 -07:00
commit 53df0eed10
275 changed files with 133056 additions and 0 deletions
@@ -0,0 +1,26 @@
import json
import time
from dedupe import stable_unique
values = [index % 5000 for index in range(20_000)]
started = time.perf_counter()
result = stable_unique(values, lambda value: value)
elapsed = time.perf_counter() - started
if result != list(range(5000)):
raise SystemExit("stable_unique produced an incorrect result")
if elapsed > 1.0:
raise SystemExit(f"benchmark exceeded one second: {elapsed:.3f}")
quality = max(0.0, 1.0 - elapsed)
print(
json.dumps(
{
"metrics": {
"benchmark_quality": quality,
"correctness_rate": 1.0,
"maintainability_score": 1.0,
}
},
sort_keys=True,
)
)