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

A pure read says the time to land: the median and the slowest hours from a pull's opening to its landing over the last 24 h #6442

shipped production is serving it opened this has it
opened this

Flow work for #5930 (the KPI "time to clear").

Done when:

  • [ ] A new src/flow/lead_time.ts exports readLeadTime(db, now, publicOnly): { landed, medianHours, maxHours } for pulls merged into their default branch in the last 24 h, with both hours null when none landed.
  • [ ] It is one SQL read, with the same publicOnly rule as readVitals in src/flow/vitals.ts.
  • [ ] Tests: three landed pulls give the right median and max; a pull merged into a non-default branch is left out; one older than 24 h is left out; publicOnly hides private repositories.
  • [ ] Nothing reads it yet. Showing it waits for the vitals follow-ups.

Files: src/flow/lead_time.ts, a new test/flow-lead-time.test.ts.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs