Skip to content

Commit

Permalink
Properly handle config names that contain whitespaces.
Browse files Browse the repository at this point in the history
  • Loading branch information
tsuna committed Sep 13, 2011
1 parent 82aaa63 commit 4ed6967
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions sysbench.html
Expand Up @@ -58,7 +58,14 @@
});
configs.sort();
$.each(configs, function (_, config) {
list.append("<br/>" + choice(config, ucfirst(config)));
id = config.replace(/[^-_a-z0-9]+/gi, "_");
label = ucfirst(config);
list.append("<br/>" + choice(id, label));
if (id != config) {
results[id] = results[config];
delete results[config];
}
results[id].label = label;
});
list = $("#test_modes_list");
$.each(TESTS, function (mode, descr) {
Expand Down Expand Up @@ -229,10 +236,11 @@
var format = series.yaxis.tickFormatter;
var yaxis = series.yaxis;
var y = format(item.datapoint[1], yaxis);
var values = results[bench.config][bench.mode].results[bench.metric][x];
var res = results[bench.config];
var values = res[bench.mode].results[bench.metric][x];
values = $.map(values, function (y, _) { return format(y, yaxis); });
showTooltip(item.pageX, item.pageY,
series.label + " with " + x + " threads = " + y
res.label + " with " + x + " threads = " + y
+ "<br/><small>(average of " + values.join(", ") + ")</small>");
curseries = item.seriesIndex;
curpoint = item.dataIndex;
Expand Down

0 comments on commit 4ed6967

Please sign in to comment.