1005 lines
22 KiB
HTML
1005 lines
22 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Artillery report</title>
|
|
<script src='https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
|
|
<script src='https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.0/d3.min.js' charset='utf-8'></script>
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/metrics-graphics/2.6.0/metricsgraphics.min.css" />
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/metrics-graphics/2.6.0/metricsgraphics.min.js"></script>
|
|
|
|
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,300,700' rel='stylesheet' type='text/css'>
|
|
<link href='https://fonts.googleapis.com/css?family=PT+Serif:400,700,400italic' rel='stylesheet' type='text/css'>
|
|
<link href='https://netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.css' rel='stylesheet' type='text/css'>
|
|
<link href='https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css' rel='stylesheet' type='text/css'>
|
|
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.6/moment.min.js"></script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/3.10.1/lodash.min.js"></script>
|
|
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.0/ace.js" charset="utf-8"></script>
|
|
|
|
<style>
|
|
body, p, li {
|
|
font-family: sans-serif;
|
|
font-size: 10pt;
|
|
}
|
|
|
|
h1 {
|
|
font-size: 18pt;
|
|
font-weight: bold;
|
|
}
|
|
|
|
#errorsContainer > p {
|
|
color: #009900;
|
|
}
|
|
|
|
#footer {
|
|
padding: 1em;
|
|
font-size: 0.8em;
|
|
color: #999;
|
|
text-align: center;
|
|
margin-top: 1em;
|
|
background-color: #eee;
|
|
}
|
|
#editor {
|
|
font-size: 8pt;
|
|
height: 20em;
|
|
}
|
|
</style>
|
|
|
|
<script>
|
|
window.Report = {
|
|
"aggregate": {
|
|
"timestamp": "2021-02-07T17:45:41.952Z",
|
|
"scenariosCreated": 600,
|
|
"scenariosCompleted": 600,
|
|
"requestsCompleted": 600,
|
|
"latency": {
|
|
"min": 118.1,
|
|
"max": 1391.9,
|
|
"median": 303.5,
|
|
"p95": 362,
|
|
"p99": 612.2
|
|
},
|
|
"rps": {
|
|
"count": 600,
|
|
"mean": 4.99
|
|
},
|
|
"scenarioDuration": {
|
|
"min": 119.9,
|
|
"max": 1393.6,
|
|
"median": 305.6,
|
|
"p95": 364.2,
|
|
"p99": 632.4
|
|
},
|
|
"scenarioCounts": {
|
|
"just get hash": 600
|
|
},
|
|
"errors": {},
|
|
"codes": {
|
|
"200": 579,
|
|
"502": 21
|
|
},
|
|
"matches": 0,
|
|
"customStats": {},
|
|
"counters": {},
|
|
"scenariosAvoided": 0,
|
|
"phases": [
|
|
{
|
|
"duration": 120,
|
|
"arrivalRate": 5,
|
|
"name": "Warm up"
|
|
}
|
|
]
|
|
},
|
|
"intermediate": [
|
|
{
|
|
"timestamp": "2021-02-07T17:43:51.460Z",
|
|
"scenariosCreated": 49,
|
|
"scenariosCompleted": 48,
|
|
"requestsCompleted": 48,
|
|
"latency": {
|
|
"min": 286.8,
|
|
"max": 591.8,
|
|
"median": 301.9,
|
|
"p95": 515.2,
|
|
"p99": 591.8
|
|
},
|
|
"rps": {
|
|
"count": 49,
|
|
"mean": 5.01
|
|
},
|
|
"scenarioDuration": {
|
|
"min": 289.9,
|
|
"max": 630.2,
|
|
"median": 305.2,
|
|
"p95": 520.6,
|
|
"p99": 630.2
|
|
},
|
|
"scenarioCounts": {
|
|
"just get hash": 49
|
|
},
|
|
"errors": {},
|
|
"codes": {
|
|
"200": 48
|
|
},
|
|
"matches": 0,
|
|
"customStats": {},
|
|
"counters": {},
|
|
"concurrency": 1,
|
|
"pendingRequests": 1,
|
|
"scenariosAvoided": 0
|
|
},
|
|
{
|
|
"timestamp": "2021-02-07T17:44:01.444Z",
|
|
"scenariosCreated": 50,
|
|
"scenariosCompleted": 50,
|
|
"requestsCompleted": 50,
|
|
"latency": {
|
|
"min": 288.6,
|
|
"max": 360.2,
|
|
"median": 303.2,
|
|
"p95": 358.1,
|
|
"p99": 360.2
|
|
},
|
|
"rps": {
|
|
"count": 50,
|
|
"mean": 5.02
|
|
},
|
|
"scenarioDuration": {
|
|
"min": 290.4,
|
|
"max": 361.8,
|
|
"median": 305.5,
|
|
"p95": 360,
|
|
"p99": 361.8
|
|
},
|
|
"scenarioCounts": {
|
|
"just get hash": 50
|
|
},
|
|
"errors": {},
|
|
"codes": {
|
|
"200": 50
|
|
},
|
|
"matches": 0,
|
|
"customStats": {},
|
|
"counters": {},
|
|
"concurrency": 1,
|
|
"pendingRequests": 1,
|
|
"scenariosAvoided": 0
|
|
},
|
|
{
|
|
"timestamp": "2021-02-07T17:44:11.438Z",
|
|
"scenariosCreated": 50,
|
|
"scenariosCompleted": 50,
|
|
"requestsCompleted": 50,
|
|
"latency": {
|
|
"min": 289.9,
|
|
"max": 366.7,
|
|
"median": 304.6,
|
|
"p95": 359.2,
|
|
"p99": 366.7
|
|
},
|
|
"rps": {
|
|
"count": 50,
|
|
"mean": 5.01
|
|
},
|
|
"scenarioDuration": {
|
|
"min": 292.4,
|
|
"max": 371.2,
|
|
"median": 307.1,
|
|
"p95": 363.1,
|
|
"p99": 371.2
|
|
},
|
|
"scenarioCounts": {
|
|
"just get hash": 50
|
|
},
|
|
"errors": {},
|
|
"codes": {
|
|
"200": 50
|
|
},
|
|
"matches": 0,
|
|
"customStats": {},
|
|
"counters": {},
|
|
"concurrency": 1,
|
|
"pendingRequests": 1,
|
|
"scenariosAvoided": 0
|
|
},
|
|
{
|
|
"timestamp": "2021-02-07T17:44:21.441Z",
|
|
"scenariosCreated": 50,
|
|
"scenariosCompleted": 50,
|
|
"requestsCompleted": 50,
|
|
"latency": {
|
|
"min": 291.9,
|
|
"max": 357.3,
|
|
"median": 304.3,
|
|
"p95": 353.6,
|
|
"p99": 357.3
|
|
},
|
|
"rps": {
|
|
"count": 50,
|
|
"mean": 5
|
|
},
|
|
"scenarioDuration": {
|
|
"min": 294.4,
|
|
"max": 359.8,
|
|
"median": 306.3,
|
|
"p95": 355.6,
|
|
"p99": 359.8
|
|
},
|
|
"scenarioCounts": {
|
|
"just get hash": 50
|
|
},
|
|
"errors": {},
|
|
"codes": {
|
|
"200": 50
|
|
},
|
|
"matches": 0,
|
|
"customStats": {},
|
|
"counters": {},
|
|
"concurrency": 1,
|
|
"pendingRequests": 1,
|
|
"scenariosAvoided": 0
|
|
},
|
|
{
|
|
"timestamp": "2021-02-07T17:44:31.439Z",
|
|
"scenariosCreated": 50,
|
|
"scenariosCompleted": 50,
|
|
"requestsCompleted": 50,
|
|
"latency": {
|
|
"min": 291.6,
|
|
"max": 370.7,
|
|
"median": 302.7,
|
|
"p95": 349.4,
|
|
"p99": 370.7
|
|
},
|
|
"rps": {
|
|
"count": 50,
|
|
"mean": 5
|
|
},
|
|
"scenarioDuration": {
|
|
"min": 294.4,
|
|
"max": 373.8,
|
|
"median": 304.8,
|
|
"p95": 351.5,
|
|
"p99": 373.8
|
|
},
|
|
"scenarioCounts": {
|
|
"just get hash": 50
|
|
},
|
|
"errors": {},
|
|
"codes": {
|
|
"200": 50
|
|
},
|
|
"matches": 0,
|
|
"customStats": {},
|
|
"counters": {},
|
|
"concurrency": 1,
|
|
"pendingRequests": 1,
|
|
"scenariosAvoided": 0
|
|
},
|
|
{
|
|
"timestamp": "2021-02-07T17:44:41.438Z",
|
|
"scenariosCreated": 50,
|
|
"scenariosCompleted": 50,
|
|
"requestsCompleted": 50,
|
|
"latency": {
|
|
"min": 263.7,
|
|
"max": 882.9,
|
|
"median": 311.5,
|
|
"p95": 499.8,
|
|
"p99": 882.9
|
|
},
|
|
"rps": {
|
|
"count": 50,
|
|
"mean": 5
|
|
},
|
|
"scenarioDuration": {
|
|
"min": 265.4,
|
|
"max": 885,
|
|
"median": 313.5,
|
|
"p95": 501.6,
|
|
"p99": 885
|
|
},
|
|
"scenarioCounts": {
|
|
"just get hash": 50
|
|
},
|
|
"errors": {},
|
|
"codes": {
|
|
"200": 47,
|
|
"502": 3
|
|
},
|
|
"matches": 0,
|
|
"customStats": {},
|
|
"counters": {},
|
|
"concurrency": 1,
|
|
"pendingRequests": 1,
|
|
"scenariosAvoided": 0
|
|
},
|
|
{
|
|
"timestamp": "2021-02-07T17:44:51.436Z",
|
|
"scenariosCreated": 50,
|
|
"scenariosCompleted": 50,
|
|
"requestsCompleted": 50,
|
|
"latency": {
|
|
"min": 118.1,
|
|
"max": 1391.9,
|
|
"median": 293.7,
|
|
"p95": 917.6,
|
|
"p99": 1391.9
|
|
},
|
|
"rps": {
|
|
"count": 50,
|
|
"mean": 5
|
|
},
|
|
"scenarioDuration": {
|
|
"min": 119.9,
|
|
"max": 1393.6,
|
|
"median": 296.2,
|
|
"p95": 919.4,
|
|
"p99": 1393.6
|
|
},
|
|
"scenarioCounts": {
|
|
"just get hash": 50
|
|
},
|
|
"errors": {},
|
|
"codes": {
|
|
"200": 32,
|
|
"502": 18
|
|
},
|
|
"matches": 0,
|
|
"customStats": {},
|
|
"counters": {},
|
|
"concurrency": 1,
|
|
"pendingRequests": 1,
|
|
"scenariosAvoided": 0
|
|
},
|
|
{
|
|
"timestamp": "2021-02-07T17:45:01.454Z",
|
|
"scenariosCreated": 50,
|
|
"scenariosCompleted": 50,
|
|
"requestsCompleted": 50,
|
|
"latency": {
|
|
"min": 288,
|
|
"max": 374.6,
|
|
"median": 303.2,
|
|
"p95": 356.4,
|
|
"p99": 374.6
|
|
},
|
|
"rps": {
|
|
"count": 50,
|
|
"mean": 4.99
|
|
},
|
|
"scenarioDuration": {
|
|
"min": 289.7,
|
|
"max": 376.3,
|
|
"median": 305,
|
|
"p95": 358.1,
|
|
"p99": 376.3
|
|
},
|
|
"scenarioCounts": {
|
|
"just get hash": 50
|
|
},
|
|
"errors": {},
|
|
"codes": {
|
|
"200": 50
|
|
},
|
|
"matches": 0,
|
|
"customStats": {},
|
|
"counters": {},
|
|
"concurrency": 1,
|
|
"pendingRequests": 1,
|
|
"scenariosAvoided": 0
|
|
},
|
|
{
|
|
"timestamp": "2021-02-07T17:45:11.440Z",
|
|
"scenariosCreated": 50,
|
|
"scenariosCompleted": 50,
|
|
"requestsCompleted": 50,
|
|
"latency": {
|
|
"min": 286.4,
|
|
"max": 345.8,
|
|
"median": 303.3,
|
|
"p95": 320,
|
|
"p99": 345.8
|
|
},
|
|
"rps": {
|
|
"count": 50,
|
|
"mean": 5.01
|
|
},
|
|
"scenarioDuration": {
|
|
"min": 288.4,
|
|
"max": 347.3,
|
|
"median": 306.6,
|
|
"p95": 322.3,
|
|
"p99": 347.3
|
|
},
|
|
"scenarioCounts": {
|
|
"just get hash": 50
|
|
},
|
|
"errors": {},
|
|
"codes": {
|
|
"200": 50
|
|
},
|
|
"matches": 0,
|
|
"customStats": {},
|
|
"counters": {},
|
|
"concurrency": 1,
|
|
"pendingRequests": 1,
|
|
"scenariosAvoided": 0
|
|
},
|
|
{
|
|
"timestamp": "2021-02-07T17:45:21.436Z",
|
|
"scenariosCreated": 50,
|
|
"scenariosCompleted": 50,
|
|
"requestsCompleted": 50,
|
|
"latency": {
|
|
"min": 286.2,
|
|
"max": 364.4,
|
|
"median": 302.2,
|
|
"p95": 359.8,
|
|
"p99": 364.4
|
|
},
|
|
"rps": {
|
|
"count": 50,
|
|
"mean": 5.01
|
|
},
|
|
"scenarioDuration": {
|
|
"min": 287.9,
|
|
"max": 366.7,
|
|
"median": 304.5,
|
|
"p95": 362,
|
|
"p99": 366.7
|
|
},
|
|
"scenarioCounts": {
|
|
"just get hash": 50
|
|
},
|
|
"errors": {},
|
|
"codes": {
|
|
"200": 50
|
|
},
|
|
"matches": 0,
|
|
"customStats": {},
|
|
"counters": {},
|
|
"concurrency": 1,
|
|
"pendingRequests": 1,
|
|
"scenariosAvoided": 0
|
|
},
|
|
{
|
|
"timestamp": "2021-02-07T17:45:31.435Z",
|
|
"scenariosCreated": 50,
|
|
"scenariosCompleted": 50,
|
|
"requestsCompleted": 50,
|
|
"latency": {
|
|
"min": 286.6,
|
|
"max": 366.5,
|
|
"median": 307.2,
|
|
"p95": 319.7,
|
|
"p99": 366.5
|
|
},
|
|
"rps": {
|
|
"count": 50,
|
|
"mean": 5
|
|
},
|
|
"scenarioDuration": {
|
|
"min": 288.3,
|
|
"max": 368,
|
|
"median": 308.7,
|
|
"p95": 321.7,
|
|
"p99": 368
|
|
},
|
|
"scenarioCounts": {
|
|
"just get hash": 50
|
|
},
|
|
"errors": {},
|
|
"codes": {
|
|
"200": 50
|
|
},
|
|
"matches": 0,
|
|
"customStats": {},
|
|
"counters": {},
|
|
"concurrency": 1,
|
|
"pendingRequests": 1,
|
|
"scenariosAvoided": 0
|
|
},
|
|
{
|
|
"timestamp": "2021-02-07T17:45:41.435Z",
|
|
"scenariosCreated": 50,
|
|
"scenariosCompleted": 50,
|
|
"requestsCompleted": 50,
|
|
"latency": {
|
|
"min": 284.9,
|
|
"max": 569.5,
|
|
"median": 303.6,
|
|
"p95": 354.4,
|
|
"p99": 569.5
|
|
},
|
|
"rps": {
|
|
"count": 50,
|
|
"mean": 5
|
|
},
|
|
"scenarioDuration": {
|
|
"min": 287.8,
|
|
"max": 570.9,
|
|
"median": 305.1,
|
|
"p95": 356,
|
|
"p99": 570.9
|
|
},
|
|
"scenarioCounts": {
|
|
"just get hash": 50
|
|
},
|
|
"errors": {},
|
|
"codes": {
|
|
"200": 50
|
|
},
|
|
"matches": 0,
|
|
"customStats": {},
|
|
"counters": {},
|
|
"concurrency": 1,
|
|
"pendingRequests": 1,
|
|
"scenariosAvoided": 0
|
|
},
|
|
{
|
|
"timestamp": "2021-02-07T17:45:41.942Z",
|
|
"scenariosCreated": 1,
|
|
"scenariosCompleted": 2,
|
|
"requestsCompleted": 2,
|
|
"latency": {
|
|
"min": 293.9,
|
|
"max": 317,
|
|
"median": 305.5,
|
|
"p95": 317,
|
|
"p99": 317
|
|
},
|
|
"rps": {
|
|
"count": 1,
|
|
"mean": 2
|
|
},
|
|
"scenarioDuration": {
|
|
"min": 295.7,
|
|
"max": 318.6,
|
|
"median": 307.2,
|
|
"p95": 318.6,
|
|
"p99": 318.6
|
|
},
|
|
"scenarioCounts": {
|
|
"just get hash": 1
|
|
},
|
|
"errors": {},
|
|
"codes": {
|
|
"200": 2
|
|
},
|
|
"matches": 0,
|
|
"customStats": {},
|
|
"counters": {},
|
|
"concurrency": 0,
|
|
"pendingRequests": 0,
|
|
"scenariosAvoided": 0
|
|
}
|
|
]
|
|
};
|
|
</script>
|
|
|
|
<style>
|
|
h1 {
|
|
line-height: 200%;
|
|
}
|
|
|
|
body {
|
|
background-color: #fcfcfc;
|
|
}
|
|
|
|
.container {
|
|
width: 100%;
|
|
min-width: 960px;
|
|
}
|
|
</style>
|
|
|
|
|
|
</head>
|
|
<body>
|
|
|
|
<div class="container">
|
|
|
|
<div class="row" id="header">
|
|
<div class="col-lg-4 col-lg-offset-4">
|
|
<pre style="font-size: 5pt; background-color: #fcfcfc; border: none;">
|
|
_ _ _ _ _
|
|
__ _ _ __| |_(_) | | ___ _ __ _ _ _ __ ___ _ __ ___ _ __| |_
|
|
/ _` | '__| __| | | |/ _ \ '__| | | | | '__/ _ \ '_ \ / _ \| '__| __|
|
|
| (_| | | | |_| | | | __/ | | |_| | | | | __/ |_) | (_) | | | |_
|
|
\__,_|_| \__|_|_|_|\___|_| \__, | |_| \___| .__/ \___/|_| \__|
|
|
|___/ |_|
|
|
|
|
</pre>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-lg-12">
|
|
<h1 class="text-center" id="page-title">Test run on <span id="timestamp">date</span></h1>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-lg-3">
|
|
<p><strong>Summary</strong></p>
|
|
<table class="table table-bordered table-hover table-condensed">
|
|
<tbody>
|
|
<tr>
|
|
<td>Test duration</td>
|
|
<td><span id="testDuration">0</span> sec</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Scenarios created</td>
|
|
<td><span id="scenariosCreated">0</span></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>Scenarios completed</td>
|
|
<td><span id="scenariosCompleted">0</span></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="col-lg-5" id="scenarioCountsContainer">
|
|
<div>
|
|
<strong>Scenario counts:</strong>
|
|
|
|
<p></p>
|
|
|
|
<table class="table table-bordered table-hover table-condensed" id="scenarioCounts">
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-lg-1">
|
|
<div id="codesContainer">
|
|
<strong>Codes</strong>
|
|
|
|
<p></p>
|
|
|
|
<table class="table table-bordered table-hover table-condensed" id="codes">
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-lg-3">
|
|
<div id="errorsContainer">
|
|
<strong>Errors</strong>
|
|
|
|
<p></p>
|
|
|
|
<table class="table table-bordered table-hover table-condensed" id="errors">
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div> <!-- /.row -->
|
|
|
|
<div class="row">
|
|
<div class="text-center col-lg-12">
|
|
<h2>Charts</h2>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="latency-histogram text-center col-lg-12"></div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="latency text-center col-lg-12"></div>
|
|
</div>
|
|
|
|
<div class="latency-legend"></div>
|
|
|
|
<div class="row">
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="concurrency text-center col-lg-12"></div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="rps-mean text-center col-lg-12"></div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="rps-count text-center col-lg-12"></div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="codes-line text-center col-lg-12"></div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="errors-line text-center col-lg-12"></div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-lg-8 col-lg-offset-2">
|
|
<h3 class="text-center">Raw report data</h3>
|
|
<p>This is the raw JSON stats output that the report was generated from.</p>
|
|
<div id="editor">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
var editor = ace.edit("editor");
|
|
editor.getSession().setMode("ace/mode/javascript");
|
|
editor.setValue(JSON.stringify(Report, null, 2));
|
|
editor.gotoLine(1);editor.setHighlightActiveLine(false);
|
|
|
|
var l = _;
|
|
|
|
$('#timestamp').html(moment(Report.aggregate.timestamp).format('DD MMM YYYY HH:mm:SS'));
|
|
$('#testDuration').html(l.size(Report.intermediate) * 10);
|
|
$('#scenariosCompleted').html(Report.aggregate.scenariosCompleted);
|
|
$('#scenariosCreated').html(Report.aggregate.scenariosCreated);
|
|
|
|
var markers = [];
|
|
if(l.size(Report.phases) > 0) {
|
|
markers = l.foldl(Report.phases, function(acc, phase, index) {
|
|
var label = phase.name || 'Phase ' + (index + 1);
|
|
var timestamp = (index === 0) ? 0 : Report.phases[index - 1].duration + acc[index - 1].timestamp;
|
|
|
|
acc.push({
|
|
timestamp: timestamp,
|
|
label: label
|
|
});
|
|
|
|
return acc;
|
|
}, []);
|
|
}
|
|
|
|
if (l.size(Report.aggregate.scenarioCounts) > 0) {
|
|
l.each(Report.aggregate.scenarioCounts, function(count, name) {
|
|
var $tdName = $('<td>' + name + '</td>');
|
|
var percentage = Math.round(count / Report.aggregate.scenariosCreated * 100 * 1000) / 1000;
|
|
var $tdCount = $('<td>' + count + ' (' + percentage + '%)' + '</td>');
|
|
var $el = $('<tr></tr>')
|
|
.append($tdName)
|
|
.append($tdCount)
|
|
.appendTo($('#scenarioCounts'));
|
|
});
|
|
} else {
|
|
$('#scenarioCountsContainer').hide();
|
|
}
|
|
|
|
if (l.size(Report.aggregate.codes) > 0) {
|
|
l.each(Report.aggregate.codes, function(count, code) {
|
|
var anchor = '';
|
|
if (code >= 100 && code < 200) {
|
|
anchor = '#1xx_Informational';
|
|
} else if (code >= 200 && code < 300) {
|
|
anchor = '#2xx_Success';
|
|
} else if (code >= 300 && code < 400) {
|
|
anchor = '#3xx_Redirection';
|
|
} else if (code >= 400 && code < 500) {
|
|
anchor = '#4xx_Client_Error';
|
|
} else if (code >= 500 && code < 600) {
|
|
anchor = '#5xx_Server_Error';
|
|
}
|
|
|
|
var $a = $('<a>' + code + '</a>').attr('href', 'https://en.wikipedia.org/wiki/List_of_HTTP_status_codes' + anchor);
|
|
var $td = $('<td></td>').append($a);
|
|
var $el = $('<tr></tr>')
|
|
.append($td)
|
|
.append($('<td>' + count + '</td>'))
|
|
.appendTo($('#codes'));
|
|
});
|
|
} else {
|
|
$('#codesContainer').hide();
|
|
}
|
|
|
|
if (l.size(Report.aggregate.errors) > 0) {
|
|
l.each(Report.aggregate.errors, function(count, code) {
|
|
var $el = $('<tr></tr>')
|
|
.append($('<td>' + code + '</td>'))
|
|
.append($('<td>' + count + '</td>'))
|
|
.appendTo($('#errors'));
|
|
});
|
|
} else {
|
|
$('#errorsContainer > p').html('✔ Test completed without network or OS errors.');
|
|
}
|
|
|
|
var histogramData = l.map(Report.aggregate.latency, function(v, k) { return {bin: k, value: v} });
|
|
|
|
MG.data_graphic({
|
|
chart_type: 'bar',
|
|
x_label: 'Percentile',
|
|
y_label: '(ms)',
|
|
animate_on_load: true,
|
|
title: 'Overall Latency Distribution',
|
|
description: 'Distribution of all observed response latencies',
|
|
target: '.latency-histogram',
|
|
data: histogramData,
|
|
x_accessor: 'bin',
|
|
y_accessor: 'value',
|
|
binned: true,
|
|
height: 250,
|
|
interpolate: 'monotone',
|
|
padding_percentage: 0,
|
|
bar_orientation: 'vertical',
|
|
width: 450
|
|
});
|
|
|
|
var chartData = l.map(
|
|
window.Report.intermediate,
|
|
function(o,i) {
|
|
return {
|
|
timestamp: i*10+10,
|
|
|
|
rpsMean: o.rps.mean,
|
|
rpsCount: o.rps.count,
|
|
concurrency: o.concurrency,
|
|
latencyMax: o.latency.max,
|
|
latencyp99: o.latency.p99,
|
|
latencyp95: o.latency.p95,
|
|
latencyMedian: o.latency.median,
|
|
latencyMin: o.latency.min
|
|
}
|
|
});
|
|
|
|
//
|
|
// Response codes
|
|
//
|
|
|
|
if (l.size(Report.aggregate.codes) > 0) {
|
|
var codesData = l.foldl(Report.intermediate, function(acc, o, i) {
|
|
var res = {};
|
|
res.timestamp = i*10+10;
|
|
l.each(o.codes, function(count, code) {
|
|
res[code] = count;
|
|
});
|
|
acc.push(res);
|
|
return acc;
|
|
}, []);
|
|
var uniqueCodes = l.foldl(Report.intermediate, function(acc, o) {
|
|
l.each(o.codes, function(count, code) {
|
|
if (l.indexOf(acc, code) === -1) {
|
|
acc.push(code);
|
|
}
|
|
});
|
|
return acc;
|
|
}, []);
|
|
|
|
MG.data_graphic({
|
|
x_label: 'Time',
|
|
y_label: 'Count',
|
|
title: 'HTTP codes',
|
|
description: 'Occurence of HTTP response codes',
|
|
target: '.codes-line',
|
|
data: codesData,
|
|
x_accessor: 'timestamp',
|
|
y_accessor: uniqueCodes,
|
|
legend: uniqueCodes,
|
|
right: 50,
|
|
chart_type: 'line',
|
|
area: false,
|
|
markers: markers,
|
|
width: 900
|
|
});
|
|
}
|
|
|
|
//
|
|
// Errors
|
|
//
|
|
|
|
if (l.size(Report.aggregate.errors) > 0) {
|
|
var errorData = l.foldl(Report.intermediate, function(acc, o, i) {
|
|
var res = {};
|
|
res.timestamp = i*10+10;
|
|
l.each(o.errors, function(count, name) {
|
|
res[name] = count;
|
|
});
|
|
acc.push(res);
|
|
return acc;
|
|
}, []);
|
|
var uniqueErrors = l.foldl(Report.intermediate, function(acc, o) {
|
|
l.each(o.errors, function(count, name) {
|
|
if (l.indexOf(acc, name) === -1) {
|
|
acc.push(name);
|
|
}
|
|
});
|
|
return acc;
|
|
}, []);
|
|
|
|
MG.data_graphic({
|
|
title: 'Error Codes',
|
|
description: 'Occurence of error codes',
|
|
target: '.errors-line',
|
|
data: errorData,
|
|
x_accessor: 'timestamp',
|
|
y_accessor: uniqueErrors,
|
|
chart_type: 'line',
|
|
area: false,
|
|
markers: markers
|
|
});
|
|
|
|
}
|
|
|
|
//
|
|
// Latency
|
|
//
|
|
MG.data_graphic({
|
|
chart_type: 'line',
|
|
x_label: 'Time',
|
|
y_label: '(ms)',
|
|
animate_on_load: true,
|
|
area: false,
|
|
title: "Latency At Intervals",
|
|
description: "Latency values at different points during the test run",
|
|
data: chartData,
|
|
target: '.latency',
|
|
width: 900,
|
|
x_accessor: 'timestamp',
|
|
y_accessor: ['latencyMin', 'latencyMedian', 'latencyp95', 'latencyMax'],
|
|
legend: ['min', 'p50', 'p95', 'max'],
|
|
//legend_target: '.latency-legend',
|
|
right: 50,
|
|
interpolate: 'monotone',
|
|
mouseover: function(d, i) {
|
|
},
|
|
markers: markers
|
|
});
|
|
|
|
MG.data_graphic({
|
|
animate_on_load: true,
|
|
area: false,
|
|
y_label: 'Count',
|
|
x_label: 'Time',
|
|
title: 'Concurrent users',
|
|
description: 'Concurrent users',
|
|
data: chartData,
|
|
target: '.concurrency',
|
|
x_accessor: 'timestamp',
|
|
y_accessor: ['concurrency'],
|
|
interpolate: 'monotone',
|
|
markers: markers,
|
|
width: 900
|
|
});
|
|
|
|
MG.data_graphic({
|
|
animate_on_load: true,
|
|
area: false,
|
|
y_label: 'Count',
|
|
x_label: 'Time',
|
|
title: 'Mean RPS',
|
|
description: 'Mean requests per second',
|
|
data: chartData,
|
|
target: '.rps-mean',
|
|
x_accessor: 'timestamp',
|
|
y_accessor: ['rpsMean'],
|
|
interpolate: 'monotone',
|
|
markers: markers,
|
|
width: 900
|
|
});
|
|
|
|
MG.data_graphic({
|
|
animate_on_load: true,
|
|
area: false,
|
|
y_label: 'Count',
|
|
x_label: 'Time',
|
|
title: 'RPS Count',
|
|
description: 'Count of requests per second',
|
|
data: chartData,
|
|
target: '.rps-count',
|
|
x_accessor: 'timestamp',
|
|
y_accessor: ['rpsCount'],
|
|
interpolate: 'monotone',
|
|
markers: markers,
|
|
width: 900
|
|
});
|
|
</script>
|
|
<div id="footer">
|
|
<footer>This report was created with <a href="https://artillery.io">Artillery</a> - free open-source load-testing for HTTP and WebSockets</footer>
|
|
</div>
|
|
</body>
|
|
</html>
|