Coding Time
Last updated
Was this helpful?
Last updated
Was this helpful?
Note: this metric is only shown at a team level, not an individual level.
What it is: This shows how long the team spends writing code before asking for feedback.
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 PR is ready for review.
What defines the first new commit on a PR?
We exclude commits that were created earlier on other branches, and then pulled in to the PR’s head branch.
We take into account all commits that were pushed to GitHub, even if they are later squashed in a rebase. 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.
However, if you squash your commits locally before pushing them to GitHub, we will only have data about the newly squashed 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.
This is so that Coding Time
can capture the entire “draft time”. It makes sense to include the time that the PR spend in "draft" in this measure of time spent coding.
If the PR was created in a non-draft state, Coding Time
is null
. This is because it means the PR was ready for review upon creation, and Review Wait Time
(the next metric in the PR life cycle) starts at the point where the PR is first ready for review.
See here for additional notes on how this metric is calculated, from Change Lead Time
.
What good looks like:
We recommend that Coding Time
be under 4 hours. This threshold is based on an internal analysis conducted by Multitudes across 80,000 PRs from a diverse range of customers and comparing against the SPACE and DORA research.