Skip to content

Commit

Permalink
#118 added more metrics to UI
Browse files Browse the repository at this point in the history
  • Loading branch information
itayw committed Apr 17, 2014
1 parent e469c09 commit 03e4e99
Showing 1 changed file with 61 additions and 30 deletions.
91 changes: 61 additions & 30 deletions lib/webserver/public/js/benchmark.js
Expand Up @@ -11,9 +11,11 @@ joolaio.events.on('ready', function () {
dimensions: [],
metrics: [
{
key: 'bench-count',
aggregation: 'count',
dependsOn: 'benchmarkID'
key: 'avg-p999',
aggregation: 'avg',
dependsOn: 'flows.main.histogram.p999',
decimals: 2,
suffix: 'ms'
}
],
collection: 'benchmark'
Expand All @@ -26,9 +28,25 @@ joolaio.events.on('ready', function () {
dimensions: [],
metrics: [
{
key: 'flow-count',
aggregation: 'sum',
dependsOn: 'flowCount'
key: 'reqrate',
name: 'Avg. Request Time',
formula: {
dependsOn: [
{
key: 'req-count',
aggregation: 'avg',
dependsOn: 'flows.main.meter.count'
},
{
key: 'elapsed',
aggregation: 'avg',
dependsOn: 'flows.totalElapsed'
}
],
run: 'function(count, elapsed){return elapsed/count}'
},
decimals: 2,
suffix: 'ms'
}
],
collection: 'benchmark'
Expand All @@ -41,9 +59,11 @@ joolaio.events.on('ready', function () {
dimensions: [],
metrics: [
{
key: 'Test-count',
aggregation: 'sum',
dependsOn: 'flows.main.meter.count'
key: 'min-reqtime',
aggregation: 'min',
dependsOn: 'flows.main.histogram.min',
decimals: 2,
suffix: 'ms'
}
],
collection: 'benchmark'
Expand All @@ -56,23 +76,9 @@ joolaio.events.on('ready', function () {
dimensions: [],
metrics: [
{
key: 'reqrate',
name: 'Avg. Request Time',
formula: {
dependsOn: [
{
key: 'req-count',
aggregation: 'avg',
dependsOn: 'flows.main.meter.count'
},
{
key: 'elapsed',
aggregation: 'avg',
dependsOn: 'flows.totalElapsed'
}
],
run: 'function(count, elapsed){return elapsed/count}'
},
key: 'max-reqtime',
aggregation: 'max',
dependsOn: 'flows.main.histogram.max',
decimals: 2,
suffix: 'ms'
}
Expand Down Expand Up @@ -117,6 +123,14 @@ joolaio.events.on('ready', function () {
{key: 'flows.name', name: 'Flow name', collection: 'benchmark'}
],
metrics: [
{
key: 'avg-p999',
name: '99.9% Request Time',
aggregation: 'avg',
dependsOn: 'flows.main.histogram.p999',
decimals: 2,
suffix: 'ms'
},
{
key: 'reqrate',
name: 'Avg. Request Time',
Expand All @@ -137,15 +151,32 @@ joolaio.events.on('ready', function () {
},
decimals: 4,
suffix: 'ms'
},
{
key: 'min-reqtime',
name: 'Min Request Time',
aggregation: 'min',
dependsOn: 'flows.main.histogram.min',
decimals: 2,
suffix: 'ms'
},
{
key: 'max-reqtime',
name: 'Max Request Time',
aggregation: 'max',
dependsOn: 'flows.main.histogram.max',
decimals: 2,
suffix: 'ms'
}
],
collection: 'benchmark'
};

setupMetricbox('#metricbox-1', 'Benchmark Tests', metric1Query);
setupMetricbox('#metricbox-2', 'Flow Executions', metric2Query);
setupMetricbox('#metricbox-3', 'Test Count', metric3Query);
setupMetricbox('#metricbox-4', 'Avg. Request time', metric4Query);
setupMetricbox('#metricbox-1', '99.9% Request Time', metric1Query);
setupMetricbox('#metricbox-2', 'Avg. Request time', metric2Query);
setupMetricbox('#metricbox-3', 'Min Request Time', metric3Query);
setupMetricbox('#metricbox-4', 'Max Request Time', metric4Query);

setupChart('#chart-1', chart1Query);
setupTable('#table-1', table1Query);

Expand Down

0 comments on commit 03e4e99

Please sign in to comment.