Skip to content

Commit

Permalink
chore: revert "Fun/Consumed Budget Ratio metric" (#415) to fix commit…
Browse files Browse the repository at this point in the history
… message
  • Loading branch information
lvaylet authored Jan 12, 2024
1 parent 4d06fba commit 5eff3f8
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 10 deletions.
5 changes: 0 additions & 5 deletions slo_generator/exporters/bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,11 +276,6 @@ def _format(errors):
"type": "FLOAT",
"mode": "NULLABLE",
},
{
"name": "error_budget_consumed_ratio",
"type": "FLOAT",
"mode": "NULLABLE",
},
{
"name": "timestamp_human",
"type": "TIMESTAMP",
Expand Down
4 changes: 0 additions & 4 deletions slo_generator/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
LOGGER = logging.getLogger(__name__)


# pylint: disable=too-many-arguments,too-many-locals
@dataclass(init=False)
class SLOReport:
"""SLO report dataclass. Compute an SLO report out of an SLO config and an
Expand Down Expand Up @@ -61,7 +60,6 @@ class SLOReport:
error_budget_minutes: float
error_budget_remaining_minutes: float
error_minutes: float
error_budget_consumed_ratio: float

# Data validation
valid: bool
Expand Down Expand Up @@ -149,7 +147,6 @@ def build(self, step, data):
eb_remaining_minutes = self.window * gap / 60
eb_target_minutes = self.window * eb_target / 60
eb_minutes = self.window * eb_value / 60
eb_ratio = eb_value * 100 / eb_target if eb_target > 0 else 0
if eb_target == 0:
eb_burn_rate = 0
else:
Expand Down Expand Up @@ -181,7 +178,6 @@ def build(self, step, data):
error_budget_remaining_minutes=eb_remaining_minutes,
error_budget_minutes=eb_target_minutes,
error_minutes=eb_minutes,
error_budget_consumed_ratio=eb_ratio,
alert=alert,
consequence_message=consequence_message,
)
Expand Down
1 change: 0 additions & 1 deletion tests/unit/fixtures/slo_report_v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"error_budget_remaining_minutes": -288,
"error_budget_target": 0.09999999999999998,
"error_minutes": "360.0",
"error_budget_consumed_ratio": 19.9999999999999,
"events_count": 7112,
"gap": -0.4,
"goal": 0.9,
Expand Down

0 comments on commit 5eff3f8

Please sign in to comment.