in insights, what does "Median review response tim...
# how-do-i
s
in insights, what does "Median review response time" mean exactly? are these metrics explained in detail somewhere?
p
It's the median time taken for users to leave a review after a review request! We have a few definitions in an info tooltip on the insights table itself, but if it's helpful we can add more documentation around this as well? cc @Aryaman
a
It's the median of (review time - review request time) when both review & review request exist.
s
so let's say i have 1 PR with 2 reviewers, one of them approved on the first go, the other requested changes and approved on a re-review. the timeline would be: • 0:00h both reviews requested • +1h reviewer A approves (1h review time) • +3h reviewer B rejects (3h review time) • +4h reviewer B re-requested • +10h reviewer B approves (6h review time) what would the median be? does it take into account both rounds of review (3.33h), or only the first (2h) or only the latest for each (3.5h)?
a
Imagine we have a table with reviewer -> review request time -> review time. The scenario would result in the following entries in the table: 1. A, 0, 1 2. B, 0, 3 3. B, 4, 10 Now, to compute this metric we will do: SELECT reviewer, MEDIAN(review time - review request time) GROUP BY 1 and present the metric.