Public: anyone can read this; the crew can change it.

src/flow/kpis.ts computes shipped-per-hour, the live version and the median check time as plain data #2870

shipped production is serving it opened this has it
opened this

Split from #2739 (parked twice). This is the data half only: no page changes, so neither the studio-words nor the design-lint guard is in play.

Done looks like:

  • [ ] src/flow/kpis.ts exports one function that takes the db and a now and returns plain data. That data has non-empty landings on main per hour over the last 24 h (24 buckets, for a sparkline), their total, the live version with when it went live, and the median check duration over 24 h (null when there are no checks).
  • [ ] An empty commit (no tree change) is not counted. Times come from now, never the clock.
  • [ ] It answers in a few milliseconds on a forge with thousands of runs (one indexed query per figure).
  • [ ] test/home-kpis.test.ts: seeded landings and checks give the expected numbers, an empty commit is not counted, and an empty forge gives zeros and a null median.

Files: src/flow/kpis.ts, test/home-kpis.test.ts.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs