mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 08:55:24 +00:00
UI - Update host-specific performance impact calculations (#15706)
## Fixes an existing bug in calculating performance impact for host-specifc query stats --------- Co-authored-by: Jacob Shandling <jacob@fleetdm.com> Co-authored-by: Sarah Gillespie <73313222+gillespi314@users.noreply.github.com>
This commit is contained in:
parent
bfd54b8868
commit
369b3feb35
@ -136,9 +136,11 @@ const enhanceScheduleData = (
|
|||||||
discard_data,
|
discard_data,
|
||||||
automations_enabled,
|
automations_enabled,
|
||||||
} = query;
|
} = query;
|
||||||
|
// getPerformanceImpactDescription takes aggregate p50 values
|
||||||
|
// getPerformanceImpactDescription takes aggregate p50 values so we need to divide by total executions in order to show average performance per query execution
|
||||||
const scheduledQueryPerformance = {
|
const scheduledQueryPerformance = {
|
||||||
user_time_p50: user_time,
|
user_time_p50: executions > 0 ? user_time / executions : 0,
|
||||||
system_time_p50: system_time,
|
system_time_p50: executions > 0 ? system_time / executions : 0,
|
||||||
total_executions: executions,
|
total_executions: executions,
|
||||||
};
|
};
|
||||||
return {
|
return {
|
||||||
|
Loading…
Reference in New Issue
Block a user