For the complete documentation index, see llms.txt. This page is also available as Markdown.

Coding Time

Coding time graph

What it is: This shows how long the team spends writing code before a PR is sent for review.

Why it matters: Coding Time represents the first part of the development cycle in a team, and it can be a bottleneck that increases Change Lead Time. There are many reasons why Coding Time might be high, e.g. poorly-scoped work, external interruptions leading to less focus time, or a complicated piece of work.

How we calculate it: This measures the number of hours from the first new commit on a PR to when the next part of Change Lead Time begins. Coding Time ends at:

  1. the first human review request, or

  2. the first human response, if there was no earlier review request, or

  3. the last commit before the merge, if there was neither a human review request nor a human response.

  • What defines the first new commit on a PR?

    • It’s the earliest commit made on the PR’s branch after the branch was created. Commits that already existed before the branch was created don’t count.

    • Once a PR has been opened, we take into account all commits that were pushed to GitHub, even if they are later squashed. This means that even if you squash all your commits on a PR down to 1 commit before merging, we will still use the timestamp of your first original commit as the start of coding time, as long as the original commit was pushed previously.

    • In order to provide the most accurate measure of Coding Time, we therefore encourage you to open a PR early and push commits to GitHub as they are made, even if the intent is to rebase or squash these commits.

  • What happens if first new commit time is after PR creation time?

    • If the first new commit on a PR comes after PR creation time, then the PR creation time is taken as the start of coding time, rather than the time of first commit.

  • Whether a PR is in draft state doesn’t affect Coding Time.

  • See here for additional notes on how this metric is calculated, from Change Lead Time.

Last updated

Was this helpful?