Skip to main content

Module lead_time

Module lead_time 

Expand description

lead-time analysis.

Computes the time elapsed between a commit’s author-date (when the change was authored) and committer-date (when it was merged to mainline). Captures the “how long does code sit in review before shipping?” question — a foundational DORA metric.

§Why per-commit, not per-PR?

CodeLore is git-only by design — no GitHub PR metadata in scope (see project_git_only_scope). Git’s commit object carries BOTH author-date and committer-date; their delta is the in-flight time. On merge-via-squash workflows this delta is small (the squash commit is born at merge); on merge-via-rebase or merge-via-merge-commit workflows it’s the true review-time. Either way it’s a defensible proxy.

§Output

One row per commit, ordered by lead-time DESC. Useful for identifying stragglers + computing org-wide percentiles.

Structs§

LeadTimeRow

Functions§

run_lead_time
Run the lead-time analysis. Returns commits ordered by lead-time DESC. Merge commits are excluded — their lead-time is architecturally zero on most workflows.