https://progress.opensuse.org/https://progress.opensuse.org/themes/openSUSE/favicon/favicon.ico?15829177842021-09-23T21:33:30ZopenSUSE Project Management ToolopenQA Infrastructure - action #99138: Provide ratio of tests by result in monitoring - by job grouphttps://progress.opensuse.org/issues/99138?journal_id=4488572021-09-23T21:33:30Zokurzokurz@suse.com
<ul><li><strong>Copied from</strong> <i><a class="issue tracker-4 status-3 priority-4 priority-default closed child" href="/issues/99135">action #99135</a>: Provide ratio of tests by result in monitoring - by worker</i> added</li></ul> openQA Infrastructure - action #99138: Provide ratio of tests by result in monitoring - by job grouphttps://progress.opensuse.org/issues/99138?journal_id=4488602021-09-23T21:33:56Zokurzokurz@suse.com
<ul><li><strong>Copied to</strong> <i><a class="issue tracker-4 status-1 priority-4 priority-default" href="/issues/99141">action #99141</a>: [easy][beginner] Provide ratio of tests by result in monitoring - by machine</i> added</li></ul> openQA Infrastructure - action #99138: Provide ratio of tests by result in monitoring - by job grouphttps://progress.opensuse.org/issues/99138?journal_id=4489352021-09-24T05:35:03Zokurzokurz@suse.com
<ul></ul><p>I tried</p>
<pre><code>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
</code></pre>
<p>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'.</p>
<p>Maybe better:</p>
<pre><code>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;
</code></pre>
<p>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</p>
openQA Infrastructure - action #99138: Provide ratio of tests by result in monitoring - by job grouphttps://progress.opensuse.org/issues/99138?journal_id=4622392021-11-09T14:13:35Zokurzokurz@suse.com
<ul><li><strong>Parent task</strong> deleted (<del><i>#96185</i></del>)</li></ul><p>Deleting parent task relation as we can followup with this later and I would like to close the parent epic</p>
openQA Infrastructure - action #99138: Provide ratio of tests by result in monitoring - by job grouphttps://progress.opensuse.org/issues/99138?journal_id=5175492022-05-10T10:32:30Zokurzokurz@suse.com
<ul><li><strong>Project</strong> changed from <i>openQA Project</i> to <i>openQA Infrastructure</i></li><li><strong>Category</strong> deleted (<del><i>Feature requests</i></del>)</li></ul>