Skip to content

Commit

Permalink
label error rate chart (#303)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeknovy authored Jan 25, 2023
1 parent a483dbb commit b6f0690
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/app/_services/item-chart.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class ItemChartService {
threads, overallTimeResponse,
overallThroughput, overAllFailRate, overAllNetworkV2,
responseTime, throughput, networkV2, minResponseTime, maxResponseTime, percentile90,
percentile95, percentile99, statusCodes
percentile95, percentile99, statusCodes, errorRate,
} = plot;

const threadLine = { ...threadLineSettings, name: "virtual users", data: threads, tooltip: { valueSuffix: "" } };
Expand Down Expand Up @@ -78,6 +78,9 @@ export class ItemChartService {
if (percentile99) {
chartLines.labels.set(Metrics.ResponseTimeP99, percentile99.map((label) => ({ ...label, suffix: " ms" })));
}
if (errorRate) {
chartLines.labels.set(Metrics.ErrorRate, errorRate.map((label) => ({ ...label, suffix: " %" })))
}
chartLines.labels.set(Metrics.ResponseTimeAvg, responseTime.map((label) => ({ ...label, suffix: " ms" })));
chartLines.labels.set(Metrics.Throughput, throughput.map((label) => ({ ...label, suffix: " reqs/s" })));

Expand Down
3 changes: 2 additions & 1 deletion src/app/item-detail/label-chart/label-chart.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export class LabelChartComponent implements OnChanges {
[Metrics.ResponseTimeP90, commonGraphSettings("ms")],
[Metrics.ResponseTimeP95, commonGraphSettings("ms")],
[Metrics.ResponseTimeP99, commonGraphSettings("ms")],
[Metrics.ErrorRate, commonGraphSettings("%")]
]);

constructor() {
Expand Down Expand Up @@ -78,7 +79,7 @@ export class LabelChartComponent implements OnChanges {
if (this.responseTimeMetricGroup.includes(metric)) {
responseTimesSeries.push({ data: labelMetricsData.data, suffix: labelMetricsData.suffix, name: metric, yAxis: 0 });
} else {
this.labelCharts.set(metric, { ...chartSettings, series: [labelMetricsData, threadLine] });
this.labelCharts.set(metric, { ...chartSettings, series: [{ data: labelMetricsData.data, suffix: labelMetricsData.suffix, name: metric }, threadLine] });
}
});
this.labelCharts.set("Response Times", { ...commonGraphSettings("ms"), series: [...responseTimesSeries, threadLine] });
Expand Down

0 comments on commit b6f0690

Please sign in to comment.