Unify runner waitTime graphQL enpoints and make percentiles parametrised
Description
Currently we define GraphQL fields for percentiles hardcoding the percentile requested, we could instead make the API more flexible:
query runnerWaitTimeHistory($fromTime: Time, $toTime: Time) {
ciQueueingHistory(runnerType: INSTANCE_TYPE, fromTime: $fromTime, toTime: $toTime) {
timeSeries {
time
p99 percentile(99)
p95 percentile(99)
p90 percentile(90)
p50 percentile(90)
}
}
}
query runnersWaitTimesEE {
runners(type: INSTANCE_TYPE) {
jobsStatistics {
queuedDuration {
p50: percentile(0.5)
p75: percentile(0.75)
p90: percentile(0.90)
p99: percentile(0.99)
}
}
}
}
We could use percentile
, percentileCont
or quantile
as the name for this field. quantile
seems to be right terminology, while percentile
is more commonly used
-
Add percentile
to both -
I propose we put both under the same GraphQL API endpoint. -
Decide on 0.99
vs99
as parameter
Original Discussion
The following discussion from !131797 (merged) should be addressed:
-
@mrincon started a discussion: (+5 comments) - The percentiles don't match: in the stats we have 50, 75, 90, 99 and in the historic we have p99 p95 p90 p50 (we have different data, I'll work with @pedropombeiro and @vshushlin)