Skip to content

[BUG] Use total-time data for the registry history chart’s seconds axis #154

Description

@lukekarrys

Problem

app/src/hooks/use-history-data.ts currently prefers registryPerPackageCountChartData over registryChartData when extracting registry history. Those values are normalized milliseconds per package, while history-chart.tsx treats registry history values as total seconds.

The result is a unit mismatch: values such as 60.14/90.18 are plotted and labeled as seconds even though they came from the per-package series. The hook’s own comment says registry variations should use total-time data.

Proposed fix

Prefer registryChartData for registry history and use per-package data only in a UI that is explicitly labeled in ms/package. Preserve a sensible fallback for older data files.

Acceptance criteria

  • Registry history uses total-time registryChartData when available.
  • The y-axis and tooltip units match the selected source.
  • Older chart-data files without the preferred source still render safely.
  • Tests cover both current and legacy payload shapes.

Source

Performance investigation: item 2 — registry history unit mismatch

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions