Skip to content

Cycle time and lead time never say what they measure #183

Closed

Description

@imshashank

On a sprint that has not completed anything, the Cycle time and Lead time cards both say "Nothing completed yet" and stop. On a sprint that has completed something, they show a histogram with no explanation of what is being measured, from when to when.

Neither state tells a reader what these numbers mean, and both of them are terms that different teams define differently.

What the code actually measures

cycleFlowMetrics in packages/core/src/analytics/burndown.ts is the source of truth, and the UI should say out loud what it does:

  • Which timestamps each metric runs between. The issue table has created_at, started_at, state_entered_at, completed_at and canceled_at, so there are several plausible definitions and only one implemented.
  • Whether cancelled issues are counted.
  • Whether issues that moved into the sprint late are counted from when they were created or from when they entered the sprint.

Read the function, then write down what it does. If what it does is not what most teams would expect, say so on this thread rather than quietly changing it, because somebody is already reading these numbers.

What to build

A better empty state. "Nothing completed yet" is accurate and useless. Replace it with something that says what would fill it and when: which sprint it is looking at, that cycle time is measured over issues completed inside the sprint window, and that the card fills in once one is done. If the sprint has not started, say that instead.

A definition on the card. A short line under the title, or a hover, that states the measurement in one sentence. "Time from first moving into a started state to completion, for the 12 issues completed in this sprint." The count matters as much as the distribution, because a median over three issues is not a median.

Show the sample size and the spread. distributionOf in packages/core/src/analytics/math.ts already computes percentiles. Surface p50 and p90 as numbers next to the histogram rather than leaving the reader to estimate them off the bars. percentile is already there and already tested.

Document it. Add the definitions to docs/concepts.md, which is where Orbit explains what it calls things. Right now cycle time and lead time appear in the product and nowhere in the documentation.

Files

  • apps/web/src/features/analytics/cycle-panel.tsx
  • packages/core/src/analytics/burndown.ts
  • packages/core/src/analytics/math.ts
  • apps/web/src/features/charts/histogram.tsx
  • docs/concepts.md

Good first issue

The empty state and the definition line are small, self contained and need no database work. The percentile surfacing is slightly more involved. Any of the three is a complete contribution on its own.

Activity

  1. added
    documentation
    enhancement
    good first issue
    help wanted
    ready
    p2 medium
    area: analytics
    on Aug 8, 2026
  2. added
    size: small
    points: 2
    on Aug 8, 2026
  3. imshashank commented on Aug 15, 2026

    @imshashank
    ContributorAuthor

    Most of this landed in #309. One piece is left, so re-scoping rather than closing.

    Done. The sprint lens (apps/web/src/features/analytics/sprint-lens.tsx) now shows, for both metrics:

    • p50 and p85 as numbers next to the distribution, which was the "show the sample size and the spread" request. The issue asked for p90; the implementation picked p85.
    • A definition line, from data.formulas.leadTime and data.formulas.cycleTime. These come from formulas() in packages/core/src/analytics/sprints.ts and state the measurement outright. Lead time is "current issue-row creation to durable completion for issues whose creation row remains available", cycle time is "current mutable startedAt column to completion".
    • A coverage line, leadTimeCoverage and cycleTimeCoverage, which answers the question this issue raised about whether the numbers can be trusted for a given sprint. Completed sprints are labelled reconstructed-current-column rather than presented as frozen, which is a more honest answer than the issue asked for.
    • count is on each distribution, so the empty case is distinguishable from a real one and a median over three issues is visible as such.

    So the product no longer leaves a reader guessing what is being measured, and cycle-panel.tsx, the file this issue named, is no longer rendered at all.

    Left to do, and the whole remaining scope of this issue. Cycle time and lead time still appear in the product and nowhere in the documentation. docs/concepts.md has no mention of either. That was the fourth item here and it is now the only one outstanding.

    The definitions no longer have to be derived by reading burndown.ts, which is what made this a harder task when it was filed. They can be lifted from formulas() and rewritten in plain language, along with the coverage values and what they mean. That is a genuinely small, self-contained documentation change and it is still a good first issue.

  4. be-student commented on Sep 6, 2026

    @be-student
    Contributor

    I would like to take the remaining documentation scope described in the latest maintainer comment. I will document the current lead-time and cycle-time boundaries from the analytics formulas, including coverage and completed-sprint limitations, without changing the calculations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: analyticsdocumentationenhancementgood first issuehelp wantedp2 mediumpoints: 2readysize: small

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions