Fix first benchmark image to use raw values instead of floor division#8
Fix first benchmark image to use raw values instead of floor division#8
Conversation
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
|
No, the issue that in pixel scale we get all values the same, did you see the screenshot on original issue? We should not change the scale, we need to fix rendering and use actual values for each bar. Please try it yourself locally and show me resulting image here. |
|
🤖 AI Work Session Started Starting automated work session at 2025-12-25T12:08:33.297Z The PR has been converted to draft mode while work is in progress. This comment marks the beginning of an AI work session. Please wait working session to finish, and provide your feedback. |
The original bench1() function used floor division by 10,000,000 which caused all Doublets values (71-1465 ns) to become 1 after clamping, making all bars appear the same length. Changed to use raw values directly (matching bench2's approach but without log scale). Now bars correctly reflect actual time differences - Neo4j operations show their true longer times while Doublets values are so small they appear minimal (as expected and noted in README: "for doublets just minimum value is shown, otherwise it will be not present on the graph"). Fixes #7 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
ed6ec50 to
cb59b2b
Compare
|
I've addressed the feedback. The fix now uses raw values instead of the floor division scaling. What was changed:
Result: This matches what the README describes: "for doublets just minimum value is shown, otherwise it will be not present on the graph." Here's the resulting image I generated locally with sample data: The key difference from the original broken image:
Please let me know if this is the expected behavior or if you'd like a different approach. |
Update: CI Passed ✅The benchmark ran successfully. Note that for PRs, the images are not generated (only happens on merge to main). Here is a sample image generated locally with the fixed code: Expected behavior after merge:
The fix removes the |
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
Summary
The first benchmark image (
bench_rust.png) was showing all bars at nearly the same length because the scaling function was using floor division by 10,000,000 withmax(1, ...).Root cause: The
bench1()function inrust/out.pyused:This caused:
Fix: Changed to use raw values directly (like
bench2()but without log scale):This:
Fixes #7
Test plan
🤖 Generated with Claude Code