Bench: Include params in output to prevent measurement confusion

Output now shows: Throughput = XXX ops/s [iter=N ws=M] time=Xs

This prevents confusion when comparing results measured with different
workset sizes (e.g., ws=256 gives 67M ops/s vs ws=8192 gives 18M ops/s).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Moe Charm (CI)
2025-11-27 13:48:21 +09:00
parent 8355214135
commit b72519311a

View File

@ -137,7 +137,8 @@ int main(int argc, char** argv){
uint64_t end = now_ns(); uint64_t end = now_ns();
double sec = (double)(end-start)/1e9; double sec = (double)(end-start)/1e9;
double tput = (double)cycles / (sec>0.0?sec:1e-9); double tput = (double)cycles / (sec>0.0?sec:1e-9);
printf("Throughput = %9.0f operations per second, relative time: %.3fs.\n", tput, sec); // Include params in output to avoid confusion about test conditions
printf("Throughput = %9.0f ops/s [iter=%d ws=%d] time=%.3fs\n", tput, cycles, ws, sec);
(void)allocs; (void)frees; (void)allocs; (void)frees;
// Box BenchMeta: Use __libc_free to bypass hakmem wrapper // Box BenchMeta: Use __libc_free to bypass hakmem wrapper