Repository navigation
feat(hl-perf-chart): add 30d/90d/1y range picker with DuckDB backfill - #850
Merged
Merged
Conversation
1 of 3 tasks
bakabhai993
pushed a commit
to bakabhai993/OpenChainBench
that referenced
this pull request
Sep 12, 2026
…multi-range feat(hl-perf-chart): add 30d/90d/1y range picker with DuckDB backfill
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Extends
HlPerformanceCharton/hyperliquid/[slug]with a30d / 90d / 1yrange picker so builders can see up to ~11 months of daily revenue and volume history. Long-window data comes from the existinghl-archiveGo service (DuckDB on VPS, already populated with 332 daily aggregates back to 2025-08-01)./api/builder/[slug]/daily-history?days=N— proxies through the existinggetArchive()cache layer, looks up by slug (added to the archive payload via a newslugfield inhl-archive'sUpstashBuilder), and reshapes to the same wire format as/daily-seriesso the chart client only handles one payload shape.HlPerformanceChartnow derives its fetch URL from the active range:daily-serieson 30d,daily-historyon 90d / 1y. 1y renders as a smooth revenue area/line instead of a wall of 1-px bars. Users overlay is only shown on 30d because the archive schema doesn't persist per-day unique-users.Companion Go change lands on VPS (already deployed):
hl-archivenow emitssluginUpstashBuilderso consumers can look up a builder without maintaining their own address→slug map. No new env vars, no new Caddy routes — reusesHL_ARCHIVE_API_URL+HL_ARCHIVE_API_KEY(already wired for the/hyperliquidbench history endpoint).Test plan
pnpm typecheckcleanpnpm lintclean (no new warnings)pnpm test— 74 pass/v1/aggregates?window=1ynow emitsslugper builder,dextrabotreturns 332 daily points from 2025-08-01 to 2026-06-28/hyperliquid/dextrabot(30d bars, 90d dense bars, 1y line/area)curl https://openchainbench.com/api/builder/dextrabot/daily-history?days=365returns 300+ points