Skip to content

Commit

Permalink
throughput analysis (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeknovy authored Mar 8, 2021
1 parent efcb0db commit 5801583
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 6 deletions.
16 changes: 14 additions & 2 deletions src/app/item-detail/item-detail.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ <h6 class="card-title text-alizarin">Performance regression issue detected! <i c

<div class="row">
<div class="col">
<div class="card" [ngClass]="(perfAnalysis.onePerc.failed || perfAnalysis.variability.failed) ? 'performance-analysis-warning' : 'performance-analysis-success'">
<div class="card" [ngClass]="(perfAnalysis.onePerc.failed || perfAnalysis.variability.failed || perfAnalysis.throughputVariability.failed) ? 'performance-analysis-warning' : 'performance-analysis-success'">
<div class="card-body">
<h6 class="overview-body">Performance Analysis</h6>
<div>
Expand All @@ -107,14 +107,26 @@ <h6 class="overview-body">Performance Analysis</h6>
<div class="perf-analysis-check">
<div><i
[ngClass]="(perfAnalysis.variability.failed===true) ? 'fas fa-exclamation-triangle text-warning' : 'far fa-check-circle text-success'"></i>
Steady performance</div>
Steady response time performance</div>
<div *ngIf="perfAnalysis.variability.failed===true" class="perf-analaysis-desc text-secondary">
Increased variability between the fastest and the average response time was detected (up to {{perfAnalysis.variability.value}}x). The SUT might have been overloaded.
</div>
<div *ngIf="perfAnalysis.variability.failed===false" class="perf-analaysis-desc text-secondary">
The SUT was providing balanced response times across all labels.
</div>
</div>

<div class="perf-analysis-check">
<div><i
[ngClass]="(perfAnalysis.throughputVariability.failed===true) ? 'fas fa-exclamation-triangle text-warning' : 'far fa-check-circle text-success'"></i>
Steady throughput performance</div>
<div *ngIf="perfAnalysis.throughputVariability.failed===true" class="perf-analaysis-desc text-secondary">
Significant drops in throughput performance were detected (up to {{perfAnalysis.throughputVariability.value}}%). The SUT might have been overloaded.
</div>
<div *ngIf="perfAnalysis.throughputVariability.failed===false" class="perf-analaysis-desc text-secondary">
The SUT was providing balanced throughput.
</div>
</div>
</div>
</div>
</div>
Expand Down
21 changes: 17 additions & 4 deletions src/app/item-detail/item-detail.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export class ItemDetailComponent implements OnInit {
comparisonWarning = [];
token: string;
isAnonymous = false;
perfAnalysis = { variability: null, onePerc: null };
perfAnalysis = { variability: null, onePerc: null, throughputVariability: null };

constructor(
private route: ActivatedRoute,
Expand Down Expand Up @@ -116,7 +116,8 @@ export class ItemDetailComponent implements OnInit {
this.throughputChartOptions = { ...commonGraphSettings('hits/s'), series: [...throughput, ...threadLine], ...logScaleButton };
this.overallChartOptions = {
...overallChartSettings('ms'), series: [
threadLine, overallTimeResponse, throughputLine, errorLine],
threadLine, overallTimeResponse, throughputLine, errorLine,
],
};
}

Expand Down Expand Up @@ -248,7 +249,7 @@ export class ItemDetailComponent implements OnInit {
private performanceAnalaysis() {
const output = [];
this.itemData.statistics.forEach(_ => {
const variability = this.roundNumberTwoDecimals(_.avgResponseTime / _.minResponseTime);
const variability = this.roundNumberTwoDecimals(_.avgResponseTime / _.minResponseTime);
const onePerc = this.roundNumberTwoDecimals(_.n9 / _.avgResponseTime);
output.push({
variability,
Expand All @@ -262,19 +263,31 @@ export class ItemDetailComponent implements OnInit {
const variabilitySorted = output.sort((a, b) => b.variablity - a.variablity);
const onePercSorted = output.sort((a, b) => b.onePerc - a.onePerc);

const { overallThroughput, threads } = this.itemData.plot;
const { maxVu, throughput } = this.itemData.overview;
const rampUpIndex = threads.map(_ => _[1]).indexOf(maxVu);

const minThroughput = Math.min(...overallThroughput.data.slice(rampUpIndex, -2).map(_ => _[1]));
const throughputVariability = 100 - this.roundNumberTwoDecimals((minThroughput / throughput) * 100);

this.perfAnalysis = {
variability: {
value: variabilitySorted[0].variability,
avgResponseTime: variabilitySorted[0].avgResponseTime,
minResponseTime: variabilitySorted[0].minResponseTime,
minResponseTime: variabilitySorted[0].minResponseTime,
failed: variabilitySorted[0].variability > 2.5
},
onePerc: {
value: onePercSorted[0].onePerc,
avgResponseTime: onePercSorted[0].onePerc.avgResponseTime,
failed: onePercSorted[0].onePerc > 2.5
},
throughputVariability: {
value: throughputVariability,
failed: throughputVariability > 20,
}
};

}

bytesToMbps(bytes) {
Expand Down

0 comments on commit 5801583

Please sign in to comment.