Actions
action #99138
openProvide ratio of tests by result in monitoring - by job group
Start date:
Due date:
% Done:
0%
Estimated time:
Description
Updated by okurz about 3 years ago
- Copied from action #99135: Provide ratio of tests by result in monitoring - by worker added
Updated by okurz about 3 years ago
- Copied to action #99141: [easy][beginner] Provide ratio of tests by result in monitoring - by machine added
Updated by okurz about 3 years ago
I tried
with passed_jobs as (select distinct jobs.id, result, job_groups.name as group_name from jobs left join job_groups on jobs.group_id = job_groups.id where result = 'passed') select group_name, round(count(passed_jobs.id) * 100. / (select count(*) from passed_jobs), 2)::numeric(5,2)::float as ratio_passed_by_group_long_term from passed_jobs group by group_name
but this gives low numbers per job group. I guess we need to divide by the number of all jobs per job group. The "with" statement should not already filter by 'passed'.
Maybe better:
with all_jobs as (select distinct jobs.*, job_groups.name as group_name from jobs left join job_groups on jobs.group_id = job_groups.id) select group_name, round(count(all_jobs.id) * 100. / (select count(*) from all_jobs where result = 'passed'), 2)::numeric(5,2)::float as ratio_passed_by_group_long_term from all_jobs group by group_name;
takes 25s. Query is still slow and numbers for many jobs seem low but could be realistic taking into account that we consider mostly failed jobs linked to bugs "important" hence the ratio is always smaller than realistically representative
Updated by okurz about 3 years ago
- Parent task deleted (
#96185)
Deleting parent task relation as we can followup with this later and I would like to close the parent epic
Updated by okurz over 2 years ago
- Project changed from openQA Project (public) to openQA Infrastructure (public)
- Category deleted (
Feature requests)
Actions