1002 lines
22 KiB
HTML
1002 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:52:19.515Z",
|
|
"scenariosCreated": 600,
|
|
"scenariosCompleted": 600,
|
|
"requestsCompleted": 600,
|
|
"latency": {
|
|
"min": 285.7,
|
|
"max": 1002.4,
|
|
"median": 308.4,
|
|
"p95": 360.2,
|
|
"p99": 380.3
|
|
},
|
|
"rps": {
|
|
"count": 600,
|
|
"mean": 4.99
|
|
},
|
|
"scenarioDuration": {
|
|
"min": 287.2,
|
|
"max": 1004.4,
|
|
"median": 310.6,
|
|
"p95": 362.9,
|
|
"p99": 384
|
|
},
|
|
"scenarioCounts": {
|
|
"just get hash": 600
|
|
},
|
|
"errors": {},
|
|
"codes": {
|
|
"200": 600
|
|
},
|
|
"matches": 0,
|
|
"customStats": {},
|
|
"counters": {},
|
|
"scenariosAvoided": 0,
|
|
"phases": [
|
|
{
|
|
"duration": 120,
|
|
"arrivalRate": 5,
|
|
"name": "Warm up"
|
|
}
|
|
]
|
|
},
|
|
"intermediate": [
|
|
{
|
|
"timestamp": "2021-02-07T17:50:28.990Z",
|
|
"scenariosCreated": 49,
|
|
"scenariosCompleted": 48,
|
|
"requestsCompleted": 48,
|
|
"latency": {
|
|
"min": 287.4,
|
|
"max": 353.4,
|
|
"median": 307.6,
|
|
"p95": 342.2,
|
|
"p99": 353.4
|
|
},
|
|
"rps": {
|
|
"count": 49,
|
|
"mean": 5.02
|
|
},
|
|
"scenarioDuration": {
|
|
"min": 289.7,
|
|
"max": 366.4,
|
|
"median": 310.6,
|
|
"p95": 352.7,
|
|
"p99": 366.4
|
|
},
|
|
"scenarioCounts": {
|
|
"just get hash": 49
|
|
},
|
|
"errors": {},
|
|
"codes": {
|
|
"200": 48
|
|
},
|
|
"matches": 0,
|
|
"customStats": {},
|
|
"counters": {},
|
|
"concurrency": 1,
|
|
"pendingRequests": 1,
|
|
"scenariosAvoided": 0
|
|
},
|
|
{
|
|
"timestamp": "2021-02-07T17:50:38.986Z",
|
|
"scenariosCreated": 50,
|
|
"scenariosCompleted": 50,
|
|
"requestsCompleted": 50,
|
|
"latency": {
|
|
"min": 288.5,
|
|
"max": 373.6,
|
|
"median": 305.7,
|
|
"p95": 364.3,
|
|
"p99": 373.6
|
|
},
|
|
"rps": {
|
|
"count": 50,
|
|
"mean": 5.01
|
|
},
|
|
"scenarioDuration": {
|
|
"min": 290.6,
|
|
"max": 378.2,
|
|
"median": 309,
|
|
"p95": 366.1,
|
|
"p99": 378.2
|
|
},
|
|
"scenarioCounts": {
|
|
"just get hash": 50
|
|
},
|
|
"errors": {},
|
|
"codes": {
|
|
"200": 50
|
|
},
|
|
"matches": 0,
|
|
"customStats": {},
|
|
"counters": {},
|
|
"concurrency": 1,
|
|
"pendingRequests": 1,
|
|
"scenariosAvoided": 0
|
|
},
|
|
{
|
|
"timestamp": "2021-02-07T17:50:48.984Z",
|
|
"scenariosCreated": 50,
|
|
"scenariosCompleted": 50,
|
|
"requestsCompleted": 50,
|
|
"latency": {
|
|
"min": 286.3,
|
|
"max": 352,
|
|
"median": 312.6,
|
|
"p95": 342,
|
|
"p99": 352
|
|
},
|
|
"rps": {
|
|
"count": 50,
|
|
"mean": 5
|
|
},
|
|
"scenarioDuration": {
|
|
"min": 288.5,
|
|
"max": 354.1,
|
|
"median": 314.9,
|
|
"p95": 343.7,
|
|
"p99": 354.1
|
|
},
|
|
"scenarioCounts": {
|
|
"just get hash": 50
|
|
},
|
|
"errors": {},
|
|
"codes": {
|
|
"200": 50
|
|
},
|
|
"matches": 0,
|
|
"customStats": {},
|
|
"counters": {},
|
|
"concurrency": 1,
|
|
"pendingRequests": 1,
|
|
"scenariosAvoided": 0
|
|
},
|
|
{
|
|
"timestamp": "2021-02-07T17:50:58.986Z",
|
|
"scenariosCreated": 50,
|
|
"scenariosCompleted": 50,
|
|
"requestsCompleted": 50,
|
|
"latency": {
|
|
"min": 288.4,
|
|
"max": 364.5,
|
|
"median": 306.2,
|
|
"p95": 324.6,
|
|
"p99": 364.5
|
|
},
|
|
"rps": {
|
|
"count": 50,
|
|
"mean": 5
|
|
},
|
|
"scenarioDuration": {
|
|
"min": 291,
|
|
"max": 367,
|
|
"median": 308.9,
|
|
"p95": 326.9,
|
|
"p99": 367
|
|
},
|
|
"scenarioCounts": {
|
|
"just get hash": 50
|
|
},
|
|
"errors": {},
|
|
"codes": {
|
|
"200": 50
|
|
},
|
|
"matches": 0,
|
|
"customStats": {},
|
|
"counters": {},
|
|
"concurrency": 1,
|
|
"pendingRequests": 1,
|
|
"scenariosAvoided": 0
|
|
},
|
|
{
|
|
"timestamp": "2021-02-07T17:51:08.980Z",
|
|
"scenariosCreated": 50,
|
|
"scenariosCompleted": 50,
|
|
"requestsCompleted": 50,
|
|
"latency": {
|
|
"min": 287.5,
|
|
"max": 374.4,
|
|
"median": 310.2,
|
|
"p95": 366.7,
|
|
"p99": 374.4
|
|
},
|
|
"rps": {
|
|
"count": 50,
|
|
"mean": 5.01
|
|
},
|
|
"scenarioDuration": {
|
|
"min": 289.3,
|
|
"max": 377.7,
|
|
"median": 312.8,
|
|
"p95": 369.7,
|
|
"p99": 377.7
|
|
},
|
|
"scenarioCounts": {
|
|
"just get hash": 50
|
|
},
|
|
"errors": {},
|
|
"codes": {
|
|
"200": 50
|
|
},
|
|
"matches": 0,
|
|
"customStats": {},
|
|
"counters": {},
|
|
"concurrency": 1,
|
|
"pendingRequests": 1,
|
|
"scenariosAvoided": 0
|
|
},
|
|
{
|
|
"timestamp": "2021-02-07T17:51:18.979Z",
|
|
"scenariosCreated": 50,
|
|
"scenariosCompleted": 50,
|
|
"requestsCompleted": 50,
|
|
"latency": {
|
|
"min": 286.2,
|
|
"max": 434.3,
|
|
"median": 303.8,
|
|
"p95": 352.4,
|
|
"p99": 434.3
|
|
},
|
|
"rps": {
|
|
"count": 50,
|
|
"mean": 5
|
|
},
|
|
"scenarioDuration": {
|
|
"min": 287.7,
|
|
"max": 435.8,
|
|
"median": 305.4,
|
|
"p95": 354.2,
|
|
"p99": 435.8
|
|
},
|
|
"scenarioCounts": {
|
|
"just get hash": 50
|
|
},
|
|
"errors": {},
|
|
"codes": {
|
|
"200": 50
|
|
},
|
|
"matches": 0,
|
|
"customStats": {},
|
|
"counters": {},
|
|
"concurrency": 1,
|
|
"pendingRequests": 1,
|
|
"scenariosAvoided": 0
|
|
},
|
|
{
|
|
"timestamp": "2021-02-07T17:51:28.980Z",
|
|
"scenariosCreated": 50,
|
|
"scenariosCompleted": 50,
|
|
"requestsCompleted": 50,
|
|
"latency": {
|
|
"min": 285.7,
|
|
"max": 984.7,
|
|
"median": 309.2,
|
|
"p95": 364,
|
|
"p99": 984.7
|
|
},
|
|
"rps": {
|
|
"count": 50,
|
|
"mean": 5
|
|
},
|
|
"scenarioDuration": {
|
|
"min": 287.2,
|
|
"max": 986.5,
|
|
"median": 310.8,
|
|
"p95": 365.5,
|
|
"p99": 986.5
|
|
},
|
|
"scenarioCounts": {
|
|
"just get hash": 50
|
|
},
|
|
"errors": {},
|
|
"codes": {
|
|
"200": 50
|
|
},
|
|
"matches": 0,
|
|
"customStats": {},
|
|
"counters": {},
|
|
"concurrency": 1,
|
|
"pendingRequests": 1,
|
|
"scenariosAvoided": 0
|
|
},
|
|
{
|
|
"timestamp": "2021-02-07T17:51:38.985Z",
|
|
"scenariosCreated": 50,
|
|
"scenariosCompleted": 50,
|
|
"requestsCompleted": 50,
|
|
"latency": {
|
|
"min": 286.7,
|
|
"max": 371,
|
|
"median": 307.8,
|
|
"p95": 367.4,
|
|
"p99": 371
|
|
},
|
|
"rps": {
|
|
"count": 50,
|
|
"mean": 5
|
|
},
|
|
"scenarioDuration": {
|
|
"min": 290.1,
|
|
"max": 373.2,
|
|
"median": 310,
|
|
"p95": 369.4,
|
|
"p99": 373.2
|
|
},
|
|
"scenarioCounts": {
|
|
"just get hash": 50
|
|
},
|
|
"errors": {},
|
|
"codes": {
|
|
"200": 50
|
|
},
|
|
"matches": 0,
|
|
"customStats": {},
|
|
"counters": {},
|
|
"concurrency": 1,
|
|
"pendingRequests": 1,
|
|
"scenariosAvoided": 0
|
|
},
|
|
{
|
|
"timestamp": "2021-02-07T17:51:48.980Z",
|
|
"scenariosCreated": 50,
|
|
"scenariosCompleted": 49,
|
|
"requestsCompleted": 49,
|
|
"latency": {
|
|
"min": 290.5,
|
|
"max": 362.2,
|
|
"median": 308.7,
|
|
"p95": 360.4,
|
|
"p99": 362.2
|
|
},
|
|
"rps": {
|
|
"count": 50,
|
|
"mean": 5.01
|
|
},
|
|
"scenarioDuration": {
|
|
"min": 292.1,
|
|
"max": 363.9,
|
|
"median": 310.4,
|
|
"p95": 361.9,
|
|
"p99": 363.9
|
|
},
|
|
"scenarioCounts": {
|
|
"just get hash": 50
|
|
},
|
|
"errors": {},
|
|
"codes": {
|
|
"200": 49
|
|
},
|
|
"matches": 0,
|
|
"customStats": {},
|
|
"counters": {},
|
|
"concurrency": 2,
|
|
"pendingRequests": 2,
|
|
"scenariosAvoided": 0
|
|
},
|
|
{
|
|
"timestamp": "2021-02-07T17:51:58.984Z",
|
|
"scenariosCreated": 50,
|
|
"scenariosCompleted": 51,
|
|
"requestsCompleted": 51,
|
|
"latency": {
|
|
"min": 298.2,
|
|
"max": 1002.4,
|
|
"median": 310.8,
|
|
"p95": 404.6,
|
|
"p99": 997.7
|
|
},
|
|
"rps": {
|
|
"count": 50,
|
|
"mean": 5
|
|
},
|
|
"scenarioDuration": {
|
|
"min": 299.7,
|
|
"max": 1004.4,
|
|
"median": 312.3,
|
|
"p95": 406.2,
|
|
"p99": 999.7
|
|
},
|
|
"scenarioCounts": {
|
|
"just get hash": 50
|
|
},
|
|
"errors": {},
|
|
"codes": {
|
|
"200": 51
|
|
},
|
|
"matches": 0,
|
|
"customStats": {},
|
|
"counters": {},
|
|
"concurrency": 1,
|
|
"pendingRequests": 1,
|
|
"scenariosAvoided": 0
|
|
},
|
|
{
|
|
"timestamp": "2021-02-07T17:52:08.985Z",
|
|
"scenariosCreated": 50,
|
|
"scenariosCompleted": 50,
|
|
"requestsCompleted": 50,
|
|
"latency": {
|
|
"min": 297.3,
|
|
"max": 361.9,
|
|
"median": 311.3,
|
|
"p95": 322.3,
|
|
"p99": 361.9
|
|
},
|
|
"rps": {
|
|
"count": 50,
|
|
"mean": 5
|
|
},
|
|
"scenarioDuration": {
|
|
"min": 299.3,
|
|
"max": 363.7,
|
|
"median": 314.1,
|
|
"p95": 325.6,
|
|
"p99": 363.7
|
|
},
|
|
"scenarioCounts": {
|
|
"just get hash": 50
|
|
},
|
|
"errors": {},
|
|
"codes": {
|
|
"200": 50
|
|
},
|
|
"matches": 0,
|
|
"customStats": {},
|
|
"counters": {},
|
|
"concurrency": 1,
|
|
"pendingRequests": 1,
|
|
"scenariosAvoided": 0
|
|
},
|
|
{
|
|
"timestamp": "2021-02-07T17:52:18.985Z",
|
|
"scenariosCreated": 50,
|
|
"scenariosCompleted": 50,
|
|
"requestsCompleted": 50,
|
|
"latency": {
|
|
"min": 294.4,
|
|
"max": 386.2,
|
|
"median": 307.4,
|
|
"p95": 359,
|
|
"p99": 386.2
|
|
},
|
|
"rps": {
|
|
"count": 50,
|
|
"mean": 5.01
|
|
},
|
|
"scenarioDuration": {
|
|
"min": 296.5,
|
|
"max": 389.9,
|
|
"median": 311.5,
|
|
"p95": 362,
|
|
"p99": 389.9
|
|
},
|
|
"scenarioCounts": {
|
|
"just get hash": 50
|
|
},
|
|
"errors": {},
|
|
"codes": {
|
|
"200": 50
|
|
},
|
|
"matches": 0,
|
|
"customStats": {},
|
|
"counters": {},
|
|
"concurrency": 1,
|
|
"pendingRequests": 1,
|
|
"scenariosAvoided": 0
|
|
},
|
|
{
|
|
"timestamp": "2021-02-07T17:52:19.495Z",
|
|
"scenariosCreated": 1,
|
|
"scenariosCompleted": 2,
|
|
"requestsCompleted": 2,
|
|
"latency": {
|
|
"min": 302.7,
|
|
"max": 309.3,
|
|
"median": 306,
|
|
"p95": 309.3,
|
|
"p99": 309.3
|
|
},
|
|
"rps": {
|
|
"count": 1,
|
|
"mean": 1.96
|
|
},
|
|
"scenarioDuration": {
|
|
"min": 307,
|
|
"max": 311.6,
|
|
"median": 309.3,
|
|
"p95": 311.6,
|
|
"p99": 311.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>
|