Skip to content

Commit

Permalink
Change to launch failure %
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerwowen committed Aug 16, 2024
1 parent e281689 commit fc90fd5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions deploy-board/deploy_board/templates/groups/launch_rate.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
var data = new google.visualization.DataTable();
data.addColumn("datetime", "Date");

var failure_count_name = "Launch Failure Rate";
var failure_count_name = "Launch Failure %";
data.addColumn("number", failure_count_name);

var options = {
title: 'Launch Failure Rate',
title: 'Launch Failure %',
titleFontSize: 15,
height: 300,
min: 0,
Expand Down Expand Up @@ -43,7 +43,7 @@
lineWidth: 2}
},
vAxes: {
0: {title: 'Failure Rate',
0: {title: 'Failure %',
titleTextStyle: {italic: false}}
},
interpolateNulls: true,
Expand Down
7 changes: 4 additions & 3 deletions deploy-board/deploy_board/webapp/util_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,13 +189,14 @@ def get_launch_rate(request, group_name):
try:
util_data["metric_names"] = []
for env in envs:
metric_name = "zimsum:rate:teletraan.{}.{}.first_deploy{{success=false}}".format(
env["envName"], env["stageName"])
metric_name = "divideSeries(zimsum:teletraan.{env}.{stage}.first_deploy{{success=false}},zimsum:teletraan.{env}.{stage}.first_deploy)".format(
env=env["envName"], stage=env["stageName"]
)
rate_data_points = autoscaling_metrics_helper.get_raw_metrics(request, metric_name,
settings.DEFAULT_START_TIME)
json_data = []
for data_point in rate_data_points:
timestamp, value = data_point["timestamp"], data_point["value"] * 60
timestamp, value = data_point["timestamp"], data_point["value"] * 100
json_data.append([timestamp, value])

util_data[metric_name] = json_data
Expand Down

0 comments on commit fc90fd5

Please sign in to comment.