From 14187f43ef48479312de7f929dd30d9c20f07928 Mon Sep 17 00:00:00 2001 From: "Alexey Lavrenuke (load testing)" Date: Mon, 3 Mar 2014 18:12:28 +0400 Subject: [PATCH] cases graphs --- Tank/Plugins/charts.coffee | 21 +++++++++++++++++++++ Tank/Plugins/report.tpl | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/Tank/Plugins/charts.coffee b/Tank/Plugins/charts.coffee index 6df4548..3841e7e 100644 --- a/Tank/Plugins/charts.coffee +++ b/Tank/Plugins/charts.coffee @@ -168,6 +168,27 @@ $(document).ready -> return if a.name >= b.name then 1 else -1 new GraphiteChart(chartGroup.find('.charts-container'), name, data)._update() + for caseName, caseData of document.tank_metrics.cases + chartGroup = $(""" +
+
+

Metrics for '#{caseName}' case

+
+
+
+ """) + chartGroup.appendTo this + for name, group_data of caseData + data = ({ + name: key + data: ([v[0] * 1000, v[1]] for v in value) + } for key, value of group_data).sort (a, b) -> + if name in ['quantiles'] + return if parseFloat(a.name) <= parseFloat(b.name) then 1 else -1 + else + return if a.name >= b.name then 1 else -1 + + new GraphiteChart(chartGroup.find('.charts-container'), name, data)._update() $('.monitoring-charts').each -> for host, host_data of document.tank_metrics.monitoring chartGroup = $(""" diff --git a/Tank/Plugins/report.tpl b/Tank/Plugins/report.tpl index 9f7dc59..a1d163b 100644 --- a/Tank/Plugins/report.tpl +++ b/Tank/Plugins/report.tpl @@ -6,7 +6,7 @@