Add pcre benchmark to chart

This commit is contained in:
c9s 2014-05-22 21:37:12 +08:00
parent fa6a7b77e0
commit ebf528281d
2 changed files with 33 additions and 15 deletions

View file

@ -62,7 +62,8 @@
legend: { legend: {
align: 'left', align: 'left',
verticalAlign: 'top', verticalAlign: 'top',
y: 20, y: 50,
x: 100,
floating: true, floating: true,
borderWidth: 0 borderWidth: 0
}, },
@ -73,6 +74,7 @@
}, },
plotOptions: { plotOptions: {
/*
area: { area: {
fillColor: { fillColor: {
linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1}, linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1},
@ -92,11 +94,13 @@
}, },
threshold: null threshold: null
} }
*/
}, },
series: [{ series: [
{
type: 'area', type: 'area',
name: 'Speed', name: '/qux/bar/corge',
pointInterval: 1000, pointInterval: 1000,
lineWidth: 2, lineWidth: 2,
marker: { marker: {
@ -104,16 +108,28 @@
}, },
pointStart: Date.UTC(2014, 5, 16), pointStart: Date.UTC(2014, 5, 16),
data: [] data: []
}] },
{
type: 'area',
name: '/post/{year}/{month}',
pointInterval: 1000,
lineWidth: 2,
marker: {
radius: 3
},
pointStart: Date.UTC(2014, 5, 16),
data: []
}
]
}; };
var lines = data.split(/\n/); var lines = data.split(/\n/);
$(lines).each(function(i,line) { $(lines).each(function(i,line) {
var columns = line.split(/,/); var columns = line.split(/,/);
var i = parseInt(columns[1]); var str_i = parseInt(columns[1]);
if(i) { var pcre_i = parseInt(columns[2]);
options.series[0].data.push(i); options.series[0].data.push(str_i || 0);
} options.series[1].data.push(pcre_i || 0);
}); });
$('#chart').highcharts(options); $('#chart').highcharts(options);

View file

@ -444,3 +444,5 @@
1400681414,10832905.89 1400681414,10832905.89
1400685490,13185955.87 1400685490,13185955.87
1400762875,10472029.42 1400762875,10472029.42
1400764426,10066458.45,1590373.41
1400765068,10657617.64,2131810.12

Can't render this file because it has a wrong number of fields in line 447.