Skip to content

fix(distribution): auto log scale when dynamic range > 50x - #165

Merged
Flotapponnier merged 1 commit into
devfrom
fix/distribution-log-scale
May 28, 2026
Merged

fix(distribution): auto log scale when dynamic range > 50x#165
Flotapponnier merged 1 commit into
devfrom
fix/distribution-log-scale

Conversation

@Flotapponnier

Copy link
Copy Markdown
Collaborator

Fixes the distribution view where benches with wide dynamic range (l1-finality TON 0.4s → Monero 36min, ratio 5370x) collapse 7 of 9 chains into a single invisible pixel at the left edge.

Ports the same auto-log heuristic ranked-bar-chart already uses. When max/min > 50, switches to base-10 log projection. Footer flags 'log scale' for transparency.

Same component shared across all distribution-view benches — fixes l1-finality, l2-block-time, validator-yield, perp-fees, etc. in one shot.

Test plan

  • Build passes
  • 33 tests pass
  • Visual check on /benchmarks/l1-finality?view=distribution after deploy

The distribution view used a linear scale anchored at max(p99). On benches
with very wide ranges (l1-finality spans 0.4s on TON to 36 min on Monero,
ratio 5370x) every fast row collapsed to a single invisible pixel at the
left edge, making 7 of 9 chains visually indistinguishable. Only the two
slowest rows had visible bars.

Port the same auto-log heuristic ranked-bar-chart already uses: when
max/min > 50, switch to base-10 log projection so each row gets a
proportional, distinguishable position. Footer flags 'log scale' so
the reader knows when it kicks in.

Same component is shared by every bench in distribution view, so this
fixes l1-finality, l2-block-time, validator-yield, perp-fees and any
other bench with wide dynamic range in one shot.
@Flotapponnier
Flotapponnier merged commit 93b30ad into dev May 28, 2026
1 check failed
Flotapponnier added a commit that referenced this pull request May 29, 2026
fix(distribution): auto log scale when dynamic range > 50x
@Flotapponnier
Flotapponnier deleted the fix/distribution-log-scale branch May 29, 2026 09:58
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.

1 participant