From d37e5e7d00417141393232c6cb99a9dfb15a647a Mon Sep 17 00:00:00 2001 From: Ludek Novy <13610612+ludeknovy@users.noreply.github.com> Date: Sat, 21 Jan 2023 12:07:12 +0100 Subject: [PATCH] status codes (#299) --- src/app/_services/item-chart.service.ts | 13 ++++++-- .../item-detail/item-detail.component.html | 21 +++++++----- .../item-detail/item-detail.component.scss | 8 ++--- src/app/item-detail/item-detail.component.ts | 32 ++++++++++++++----- src/app/item-detail/metrics.ts | 1 + 5 files changed, 52 insertions(+), 23 deletions(-) diff --git a/src/app/_services/item-chart.service.ts b/src/app/_services/item-chart.service.ts index fdc303f9..d20c70dd 100644 --- a/src/app/_services/item-chart.service.ts +++ b/src/app/_services/item-chart.service.ts @@ -23,17 +23,19 @@ export class ItemChartService { threads, overallTimeResponse, overallThroughput, overAllFailRate, overAllNetworkV2, responseTime, throughput, networkV2, minResponseTime, maxResponseTime, percentile90, - percentile95, percentile99, + percentile95, percentile99, statusCodes } = plot; const threadLine = { ...threadLineSettings, name: "virtual users", data: threads, tooltip: { valueSuffix: "" } }; const errorLine = { ...errorLineSettings, ...overAllFailRate, tooltip: { valueSuffix: " %" } }; const throughputLine = { ...throughputLineSettings, ...overallThroughput, tooltip: { valueSuffix: " reqs/s" } }; - const chartLines = { + const chartLines = { overall: new Map(), - labels: new Map() + labels: new Map(), + statusCodes: new Map() } + // full chart configs const labelCharts = new Map() if (overAllNetworkV2) { @@ -44,6 +46,11 @@ export class ItemChartService { chartLines.overall.set(Metrics.Network, networkLine); } + // not all reports have status code plot data + if (statusCodes) { + chartLines.statusCodes.set(Metrics.StatusCodeInTime, { data: statusCodes }) + } + chartLines.overall.set(Metrics.ResponseTimeAvg, { ...overallTimeResponse, tooltip: { valueSuffix: " ms" } }); chartLines.overall.set(Metrics.Threads, threadLine); chartLines.overall.set(Metrics.ErrorRate, errorLine); diff --git a/src/app/item-detail/item-detail.component.html b/src/app/item-detail/item-detail.component.html index a5af4f65..0a172b5b 100644 --- a/src/app/item-detail/item-detail.component.html +++ b/src/app/item-detail/item-detail.component.html @@ -291,13 +291,6 @@
Summary
- - - - - - -