From 18675ca9f198e2bf19eece803c4fa2c1b3f01c15 Mon Sep 17 00:00:00 2001 From: Ludek Novy <13610612+ludeknovy@users.noreply.github.com> Date: Tue, 8 Mar 2022 09:52:07 +0100 Subject: [PATCH] header names fix (#245) --- .../request-stats/request-stats-compare.component.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/app/item-detail/request-stats/request-stats-compare.component.ts b/src/app/item-detail/request-stats/request-stats-compare.component.ts index 5ad75113..fe30e834 100644 --- a/src/app/item-detail/request-stats/request-stats-compare.component.ts +++ b/src/app/item-detail/request-stats/request-stats-compare.component.ts @@ -276,9 +276,11 @@ export class RequestStatsCompareComponent implements OnInit, OnDestroy { } downloadAsXLXS() { - const dataToBeSaved = this.labelsData.map(({ - n0: p90, n5: p95, n9: p99, label: label, statusCodes: statusCodes, responseMessageFailures, ...rest }) => - ({ label, p90, p95, p99, ...rest })) + const dataToBeSaved = this.labelsData.map((label) => + ({ label: label.label, samples: label.samples, "avg [ms]": label.avgResponseTime, "min [ms]": label.minResponseTime, + "max [ms]": label.maxResponseTime, "P90 [ms]": label.n0, "P95 [ms]": label.n5, "P99 [ms]": label.n9, + "requests/s": label.throughput, mbps: roundNumberTwoDecimals(this.convertBytesToMbps(label.bytesPerSecond + label.bytesSentPerSecond)), "error rate": label.errorRate + })) this.excelService.exportAsExcelFile(dataToBeSaved, `request-stats-${this.params.id}`) } }