summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormbeierl <mark.beierl@dell.com>2017-10-17 22:41:55 -0400
committermbeierl <mark.beierl@dell.com>2017-10-17 22:55:10 -0400
commit31b0e130755cbd425b26f740e5701768d77f98f0 (patch)
tree03378d591eca659e037e7cad0b6f055d8a365378
parent477957139b2b782b899c9cb5603389ff0802b741 (diff)
Improving Reporting
Changes IOPS and BW to summation vs. average. Adds fixed 0 y axis to all graphs Change-Id: I3379597bda04b030424a25c7309a02c982fdb706 Signed-off-by: mbeierl <mark.beierl@dell.com>
-rw-r--r--docker/storperf-master/storperf/db/graphite_db.py7
-rw-r--r--docker/storperf-master/storperf/storperf_master.py5
-rw-r--r--docker/storperf-master/storperf/utilities/data_handler.py12
-rw-r--r--docker/storperf-master/storperf/workloads/_base_workload.py2
-rw-r--r--docker/storperf-master/tests/db_tests/graphite_db_test.py5
-rw-r--r--docker/storperf-master/tests/utilities_tests/data_handler_test.py3
-rw-r--r--docker/storperf-reporting/src/templates/plot_multi_data.html55
7 files changed, 52 insertions, 37 deletions
diff --git a/docker/storperf-master/storperf/db/graphite_db.py b/docker/storperf-master/storperf/db/graphite_db.py
index aa71855..8ebd22e 100644
--- a/docker/storperf-master/storperf/db/graphite_db.py
+++ b/docker/storperf-master/storperf/db/graphite_db.py
@@ -33,19 +33,20 @@ class GraphiteDB(object):
return result
- def fetch_series(self, workload, metric, io_type, time, duration):
+ def fetch_series(self, function, workload, metric,
+ io_type, time, duration):
series = []
end = time
start = end - duration
request = ("http://%s:%s/graphite/render/?target="
- "averageSeries(%s.*.jobs.1.%s.%s)"
+ "%s(%s.*.jobs.1.%s.%s)"
"&format=json"
"&from=%s"
"&until=%s"
% (self.graphite_host, self.graphite_port,
- workload, io_type, metric,
+ function, workload, io_type, metric,
start, end))
self.logger.debug("Calling %s" % (request))
diff --git a/docker/storperf-master/storperf/storperf_master.py b/docker/storperf-master/storperf/storperf_master.py
index ef9ace3..c84a02c 100644
--- a/docker/storperf-master/storperf/storperf_master.py
+++ b/docker/storperf-master/storperf/storperf_master.py
@@ -422,11 +422,6 @@ class StorPerfMaster(object):
metadata = self.fetch_metadata(job)
if 'report' in metadata:
metadata['report']['_id'] = job
- metadata['report']['start_date'] = \
- metadata['report']['start_time']
- metadata['report']['end_date'] = \
- metadata['report']['end_time']
- metadata['report']['_id'] = job
job_report['results'].append(metadata['report'])
return job_report
diff --git a/docker/storperf-master/storperf/utilities/data_handler.py b/docker/storperf-master/storperf/utilities/data_handler.py
index 8a69180..b85517f 100644
--- a/docker/storperf-master/storperf/utilities/data_handler.py
+++ b/docker/storperf-master/storperf/utilities/data_handler.py
@@ -43,7 +43,12 @@ class DataHandler(object):
for io_type in ('read', 'write'):
metrics[metric][io_type] = {}
- series = self._lookup_prior_data(executor, metric, io_type)
+ function = "sumSeries"
+ if 'mean' in metric:
+ function = "averageSeries"
+
+ series = self._lookup_prior_data(executor, metric, io_type,
+ function)
series = self._convert_timestamps_to_samples(
executor, series)
steady = self._evaluate_prior_data(
@@ -85,7 +90,7 @@ class DataHandler(object):
if steady_state and not workload_name.startswith('_'):
executor.terminate_current_run()
- def _lookup_prior_data(self, executor, metric, io_type):
+ def _lookup_prior_data(self, executor, metric, io_type, function):
workload = executor.current_workload
graphite_db = GraphiteDB()
@@ -93,7 +98,8 @@ class DataHandler(object):
# data we just sent to it
now = int(time.time())
backtime = 60 * (executor.steady_state_samples + 1)
- data_series = graphite_db.fetch_series(workload,
+ data_series = graphite_db.fetch_series(function,
+ workload,
metric,
io_type,
now,
diff --git a/docker/storperf-master/storperf/workloads/_base_workload.py b/docker/storperf-master/storperf/workloads/_base_workload.py
index c045278..d5282d7 100644
--- a/docker/storperf-master/storperf/workloads/_base_workload.py
+++ b/docker/storperf-master/storperf/workloads/_base_workload.py
@@ -23,7 +23,7 @@ class _base_workload(object):
'bs': '64k',
'iodepth': '1',
'numjobs': '1',
- 'loops': '20',
+ 'loops': '200',
'output-format': 'json',
'status-interval': '60'
}
diff --git a/docker/storperf-master/tests/db_tests/graphite_db_test.py b/docker/storperf-master/tests/db_tests/graphite_db_test.py
index d4c6fb6..d5fbbfc 100644
--- a/docker/storperf-master/tests/db_tests/graphite_db_test.py
+++ b/docker/storperf-master/tests/db_tests/graphite_db_test.py
@@ -83,9 +83,10 @@ class GraphiteDBTest(unittest.TestCase):
[1480456040, 219.28],
[1480456050, 217.75]]
- mock_requests.side_effect = (response, )
+ mock_requests.side_effect = (response,)
- actual = self.graphdb.fetch_series("workload", "iops",
+ actual = self.graphdb.fetch_series("averageSeries",
+ "workload", "iops",
"write", 0, 600)
self.assertEqual(expected, actual)
diff --git a/docker/storperf-master/tests/utilities_tests/data_handler_test.py b/docker/storperf-master/tests/utilities_tests/data_handler_test.py
index 8c7deb5..35150dd 100644
--- a/docker/storperf-master/tests/utilities_tests/data_handler_test.py
+++ b/docker/storperf-master/tests/utilities_tests/data_handler_test.py
@@ -85,7 +85,8 @@ class DataHandlerTest(unittest.TestCase):
8,
8192))
- actual = self.data_handler._lookup_prior_data(self, 'read', 'iops')
+ actual = self.data_handler._lookup_prior_data(self, "sumSeries",
+ 'read', 'iops')
self.assertEqual(expected, actual)
def test_short_sample(self):
diff --git a/docker/storperf-reporting/src/templates/plot_multi_data.html b/docker/storperf-reporting/src/templates/plot_multi_data.html
index 3e64538..9a81599 100644
--- a/docker/storperf-reporting/src/templates/plot_multi_data.html
+++ b/docker/storperf-reporting/src/templates/plot_multi_data.html
@@ -35,8 +35,8 @@
text += "<h4> Criteria : " + results[i]["criteria"] + "</h4>";
text += "<h4> Build Tag : " + results[i]["build_tag"] + "</h4>";
text += "<button type='button' class='btn btn-default btn-lg' id='para-"+ ids[i] +
- "' onclick=add_info('" + ids[i] + "')> Click here to view details </button>";
- text += "</div>";
+ "' onclick=add_info('" + ids[i] + "')> Click here to view details </button>";
+ text += "</div>";
}
$("#content").html(text);
}
@@ -60,15 +60,15 @@
text += "<h4> Criteria : " + results[i]["criteria"] + "</h4>";
text += "<h4> Build Tag : " + results[i]["build_tag"] + "</h4>";
text += "<button type='button' class='btn btn-default btn-lg' onclick=init()>Go Back</button>";
- text += "<button type='button' class='btn btn-default btn-lg' onclick=create_block_report() style='float: right;'> Steady State Convergence Report - All Block Sizes </button>";
+ text += "<button type='button' class='btn btn-default btn-lg' onclick=create_block_report() style='float: right;'> Steady State Convergence Report - All Runs </button>";
text += "<div class='row' id='block_report'></div>"
text += "</div>";
for (var i = 0; i < keys.length; i++ ){
text += "<div class='row' id='row-"+ keys[i] +"'>";
text += "<h4 onclick=add_test('" + keys[i] + "')>" + keys[i] + "</h4>";
text += "</div>";
- }
- $("#content").html(text);
+ }
+ $("#content").html(text);
}
function add_test(key){
if(document.getElementById("test-" + key) == null){
@@ -94,7 +94,7 @@
for( item in report_data[key][test] ){
var state = report_data[key][test][item]["steady_state"];
text += "<li onclick=create_modal('" + key + "','" + test + "','" + item + "') id='";
- text += key + "-" + test + "-" + item + "'>" + item + " (steady state: " + state +")";
+ text += key + "-" + test + "-" + item + "'>" + item + " (steady state: " + state +")";
text += "<br><div id='modal-" + key + "-" + test + "-" + item + "'>";
text += '<div class="modal-content-'+ key + '-' + test + '-' + item +'">';
text += '<div id="modal-text-'+ key + '-' + test + '-' + item +'"></div>';
@@ -131,9 +131,13 @@
else
name = "Latency (nanoseconds/ns)";
var len = data["series"].length;
+ var max_y = 1.25*average
for(var i = 0 ; i < len ; i++){
x[i] = data["series"][i][0];
y[i] = data["series"][i][1];
+ if(y[i] > max_y){
+ max_y=y[i]
+ }
}
var trace1 = {
x: x,
@@ -146,40 +150,41 @@
title: 'Round'
},
yaxis: {
- title: name
+ title: name,
+ range: [0, max_y]
}
};
// Creating average plot in var trace2
- var average_y = [];
+ var average_plus_y = [];
for(var i = 0; i < len ;i++ ){
- average_y.push(average)
+ average_plus_y.push(1.2*average)
}
var trace2 = {
x: x,
- y: average_y,
- name: 'Average',
+ y: average_plus_y,
+ name: 'Average + 20%',
type: 'scatter'
};
// Creating average plot in var trace3
- var average_plus_y = [];
+ var average_y = [];
for(var i = 0; i < len ;i++ ){
- average_plus_y.push(1.1*average)
+ average_y.push(average)
}
var trace3 = {
x: x,
- y: average_plus_y,
- name: '110%*Average',
+ y: average_y,
+ name: 'Average',
type: 'scatter'
};
// Creating average plot in var trace4
var average_minus_y = [];
for(var i = 0; i < len ;i++ ){
- average_minus_y.push(0.9*average)
+ average_minus_y.push(0.8*average)
}
var trace4 = {
x: x,
y: average_minus_y,
- name: '90%*Average',
+ name: 'Average - 20%',
type: 'scatter'
};
// Creating slope plot in var trace5
@@ -223,7 +228,8 @@
"</td><td> Measured Maximum Slope Excursion: " + data["slope"] + "</td></tr>";
table += "</tbody></table>";
document.getElementById("report-" + key + "-" + test + "-" + item).innerHTML = table;
- } function create_block_report(){
+ }
+ function create_block_report(){
var ele = document.getElementById("block_report");
var text = "";
text += "<ul class='list-group' style='margin: auto;'>"
@@ -283,10 +289,10 @@
for(i in report_data){
if(report_data[i][test] == undefined && test == 'lat_ns.mean')
test = 'lat.mean';
- data[i] = report_data[i][test][key];
+ data[i] = report_data[i][test][key];
}
document.getElementById('close-block-report-'+key+'-'+test).style.display = 'block';
- var modal = document.getElementById('modal-block-report-'+key+'-'+test);
+ var modal = document.getElementById('modal-block-report-'+key+'-'+test);
var modal_div = document.getElementById('modal-text-block-report-'+key+'-'+test);
modal_div.innerHTML += "<div id='graph-"+key+ "-"+ test+ "'></div><br><div id='report-"+key+ "-"+ test+ "'></div>";
var name = "";
@@ -298,6 +304,7 @@
else
name = "Latency (nanoseconds/ns)";
var plot_data = [];
+ var max_y = 0
for(i in data){
var x = [];
var y = [];
@@ -305,6 +312,9 @@
for(var j = 0 ; j < len ; j++){
x[j] = data[i]["series"][j][0];
y[j] = data[i]["series"][j][1];
+ if(y[j] > max_y){
+ max_y=y[j]
+ }
}
var trace = {
x: x,
@@ -320,7 +330,8 @@
title: 'Round'
},
yaxis: {
- title: name
+ title: name,
+ range: [0, max_y]
},
};
Plotly.newPlot('graph-'+key+'-'+test,plot_data,layout);
@@ -330,4 +341,4 @@
</script>
</body>
-</html> \ No newline at end of file
+</html>