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

9 lines
No EOL
404 B
PL/PgSQL

/* list last 100 git commits with number of builds and success rate */
SELECT git_commits.hash as revision,
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 git_commits.hash
ORDER BY git_commits.commit_time DesC
LIMIT 100