Skip to content
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.

fix(anomaly): convert slack into hourly value for hourly KPIs #1082

Merged
merged 1 commit into from
Aug 11, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion chaos_genius/core/anomaly/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@ def __init__(
self.debug = True
if self.debug == "False":
self.debug = False
self.slack = MAX_ANOMALY_SLACK_DAYS
self.slack = (
MAX_ANOMALY_SLACK_DAYS * 24
if self.kpi_info["anomaly_params"]["frequency"] == "H"
else MAX_ANOMALY_SLACK_DAYS
)

if self.kpi_info["anomaly_params"]["frequency"] == "H":
period = int(self.kpi_info["anomaly_params"]["anomaly_period"]) * 24
Expand Down