Project

General

Profile

Actions

action #99138

open

Provide ratio of tests by result in monitoring - by job group

Added by okurz about 3 years ago. Updated over 2 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Motivation

See parent #96185

Suggestion

  • Understand what has been done in #96191
  • Extend telegraf+grafana to show tests by result by job group

Related issues 2 (1 open1 closed)

Copied from openQA Project (public) - action #99135: Provide ratio of tests by result in monitoring - by workerResolvedokurz

Actions
Copied to openQA Project (public) - action #99141: [easy][beginner] Provide ratio of tests by result in monitoring - by machineNew

Actions
Actions #1

Updated by okurz about 3 years ago

  • Copied from action #99135: Provide ratio of tests by result in monitoring - by worker added
Actions #2

Updated by okurz about 3 years ago

  • Copied to action #99141: [easy][beginner] Provide ratio of tests by result in monitoring - by machine added
Actions #3

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

Actions #4

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

Actions #5

Updated by okurz over 2 years ago

  • Project changed from openQA Project (public) to openQA Infrastructure (public)
  • Category deleted (Feature requests)
Actions

Also available in: Atom PDF