Skip to content

Ensure minimum visible bar width for small values in benchmark graph#10

Merged
konard merged 4 commits intomainfrom
issue-9-2d50e2879f62
Dec 26, 2025
Merged

Ensure minimum visible bar width for small values in benchmark graph#10
konard merged 4 commits intomainfrom
issue-9-2d50e2879f62

Conversation

@konard
Copy link
Member

@konard konard commented Dec 25, 2025

Summary

  • Added ensure_min_visible() helper function that ensures non-zero values are rendered with at least 0.5% of the maximum value
  • Modified bench1() to apply minimum visibility to all data series before plotting
  • Updated Docs/bench_rust.png and Docs/bench_rust_log_scale.png with the fixed graphs
  • This guarantees approximately 2 pixels of visibility for small bars on the linear scale graph

Problem

When Doublets benchmark values are orders of magnitude smaller than Neo4j values (e.g., ~500ns vs ~50,000,000ns), the Doublets bars become completely invisible on the linear scale graph.

Solution

Calculate a minimum visible value based on the maximum value in the dataset and ensure all non-zero values are rendered at least at this minimum size. This preserves the visual indication that Doublets has a value for each operation while still showing the relative scale difference.

Test plan

  • Verified the Python script runs without errors
  • Verified the generated bench_rust.png shows visible bars for all Doublets values
  • Verified the log scale graph (bench_rust_log_scale.png) is unaffected
  • All CI checks pass

Fixes #9

🤖 Generated with Claude Code

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: #9
@konard konard self-assigned this Dec 25, 2025
When Doublets benchmark values are too small relative to Neo4j values,
the bars become invisible on the linear scale graph. This fix ensures
non-zero values are rendered with at least 0.5% of the maximum value,
guaranteeing approximately 2 pixels of visibility on the graph.

Fixes #9

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

Co-Authored-By: Claude <noreply@anthropic.com>
@konard konard changed the title [WIP] At the moment if we have values for doublets too small we need to render at least 2 pixels on the graph Ensure minimum visible bar width for small values in benchmark graph Dec 25, 2025
@konard konard marked this pull request as ready for review December 25, 2025 14:37
@konard
Copy link
Member Author

konard commented Dec 25, 2025

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $2.600601 USD
  • Calculated by Anthropic: $2.095921 USD
  • Difference: $-0.504679 (-19.41%)
    📎 Log file uploaded as GitHub Gist (793KB)
    🔗 View complete solution draft log

Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard
Copy link
Member Author

konard commented Dec 25, 2025

🔄 Auto-restart 1/3

Detected uncommitted changes from previous run. Starting new session to review and commit them.

Uncommitted files:

?? images/
?? rust/bench_rust.png
?? rust/bench_rust_log_scale.png
?? rust/out.txt
?? rust/results.md

Auto-restart will stop after changes are committed or after 2 more iterations. Please wait until working session will end and give your feedback.

Regenerated benchmark images using the fixed out.py script that ensures
minimum visible bar width for small values. The Doublets bars are now
visible on the linear scale graph.

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

Co-Authored-By: Claude <noreply@anthropic.com>
@konard
Copy link
Member Author

konard commented Dec 25, 2025

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $2.284318 USD
  • Calculated by Anthropic: $1.236716 USD
  • Difference: $-1.047601 (-45.86%)
    📎 Log file uploaded as GitHub Gist (1547KB)
    🔗 View complete solution draft log

Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard konard merged commit 20233f2 into main Dec 26, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

At the moment if we have values for doublets too small we need to render at least 2 pixels on the graph

1 participant