1
0
Fork 0
llvm-premerge-checks/scripts/metrics/SQL_queries/buildbot_failing_builders.pgsql
2021-12-14 11:40:34 +01:00

17 lines
No EOL
514 B
PL/PgSQL

/* list builders with success rate <70% over the last 7 days
these are probably worth investigating
*/
Select *,
format('https://lab.llvm.org/buildbot/#/builders/%s', builder_id) as link
FROM (
SELECT
builder_id,
count(*) as num_builds,
(100.0*count(CASE WHEN buildbot_overview.result='build successful' THEN 1 END)/count(*)) as success_prct
FROM buildbot_overview
WHERE completed_at > current_date - interval '7' day
GROUP BY builder_id
) as builder_success
WHERE success_prct < 70