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

7 lines
No EOL
403 B
PL/PgSQL

/* list number of builds and percentage of successful builds per day */
SELECT to_date(cast(git_commits.commit_time as TEXT),'YYYY-MM-DD') as date,
count(*) as num_builds,
(100.0*count(CASE WHEN buildbot_overview.result='build successful' THEN 1 END)/count(*)) as success_prct
FROM buildbot_overview, git_commits
WHERE buildbot_overview.revision = git_commits.hash
GROUP BY date ORDER BY date ASC;