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

A pure read says the gate minutes: check-slot minutes spent on merge-queue gates and on pull checks over the last hour and 6 h #6426

shipped production is serving it opened this has it
opened this

Flow work for #5930: "gate minutes" is one of the flow vitals, measured every minute. Nothing computes it today.

Done when:

  • [ ] A new src/flow/gate_minutes.ts exports readGateMinutes(db, now, publicOnly): { gate1h, gate6h, pull1h, pull6h }. Each is minutes of finished and running checks inside the window, with a running check counted up to now. Gates are the merge queue's checks (src/checks/queue.ts); pull checks are the rest.
  • [ ] A check that started before the window counts only its minutes inside it. It is one SQL read, with the same publicOnly rule as readVitals in src/flow/vitals.ts.
  • [ ] Tests: a check straddling the window's edge is clipped; a running check counts up to now; gate and pull checks are kept apart; publicOnly hides private repositories.
  • [ ] Nothing reads it yet. Showing it is the follow-up issue.

Files: src/flow/gate_minutes.ts, a new test/flow-gate-minutes.test.ts.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs