From 77470c4f6fae07496eab5b6d1ee3a8d04631b941 Mon Sep 17 00:00:00 2001 From: Joe Gordon Date: Wed, 11 Dec 2013 15:12:05 +0100 Subject: [PATCH] Add graph for gate hit count When looking at the gate failure rate it is easier to interpret it if one knows how big the data set is. Also change the color codes used to be brighter and human readable. Color code names found here: http://graphite.readthedocs.org/en/1.0/url-api.html Change-Id: I7d304623b3c244876684ea2b0f822dee354b84c1 --- web/share/elastic-recheck.js | 9 +++++++++ web/share/index.html | 35 +++++++++++++++++++++++++++++------ 2 files changed, 38 insertions(+), 6 deletions(-) diff --git a/web/share/elastic-recheck.js b/web/share/elastic-recheck.js index 3ce60758..13994f15 100644 --- a/web/share/elastic-recheck.js +++ b/web/share/elastic-recheck.js @@ -21,6 +21,15 @@ function graphite_moving_avg(job, color) { return graph; } +function graphite_hit_count(job, color) { + var time = '5hours'; + var graph = "color(alias(hitcount("; + graph += "sum(stats.zuul.pipeline.gate.job." + job + ".{SUCCESS,FAILURE})"; + graph += ",'" + time + "'), '" + job + "'),'" + color + "')"; + return graph; +} + + function update() { $.getJSON('http://status.openstack.org/elastic-recheck/data/graph.json', function(data) { var seen = []; diff --git a/web/share/index.html b/web/share/index.html index ea807c6b..d78e268b 100644 --- a/web/share/index.html +++ b/web/share/index.html @@ -77,17 +77,40 @@ $("#graph-container").append($(new Image()).graphite({ yMax: 100, yMin: 0, target: [ - graphite_moving_avg("gate-tempest-dsvm-neutron", "00c868"), - graphite_moving_avg("gate-tempest-dsvm-full","00FF00"), - graphite_moving_avg("gate-grenade-dsvm","800080"), - graphite_moving_avg("gate-tempest-dsvm-large-ops","00F0F0"), - graphite_moving_avg("gate-tempest-dsvm-neutron-large-ops","E080FF"), - graphite_moving_avg("gate-tempest-dsvm-postgres-full","ED9121") + graphite_moving_avg("gate-tempest-dsvm-neutron", "purple"), + graphite_moving_avg("gate-tempest-dsvm-full","orange"), + graphite_moving_avg("gate-grenade-dsvm","brown"), + graphite_moving_avg("gate-tempest-dsvm-large-ops","blue"), + graphite_moving_avg("gate-tempest-dsvm-neutron-large-ops","aqua"), + graphite_moving_avg("gate-tempest-dsvm-postgres-full","magenta") ], title: "Gate Failure Rates" })); +
+ +
+