Skip to content

Commit

Permalink
standard deviation metric (#313)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeknovy authored Mar 17, 2023
1 parent f50352c commit 2af9e39
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ <h6 class="card-header bg-transparent">Request Statistics <span class="compare">
<th scope="col" class="hd jtl-head-color" *ngIf="displayColumn(itemData.userSettings?.requestStats?.avg)">
<mfDefaultSorter by="avgResponseTime">avg [{{ defaultUnit ? "ms" : "%" }}]</mfDefaultSorter>
</th>
<th scope="col" class="hd jtl-head-color" *ngIf="displayColumn(itemData.userSettings?.requestStats?.standardDeviation)">
<mfDefaultSorter by="avgResponseTime">std {{ defaultUnit ? "" : "[%]" }}</mfDefaultSorter>
</th>
<th scope="col" class="hd jtl-head-color" *ngIf="displayColumn(itemData.userSettings?.requestStats?.min)">
<mfDefaultSorter by="minResponseTime">min [{{ defaultUnit ? "ms" : "%" }}]</mfDefaultSorter>
</th>
Expand Down Expand Up @@ -114,6 +117,9 @@ <h6 class="card-header bg-transparent">Request Statistics <span class="compare">
<td *ngIf="displayColumn(itemData.userSettings?.requestStats?.avg)"><span
[className]="comparedData ? _.avgResponseTime > 0 ? 'value-positive' : 'value-negative' : ''">{{_.avgResponseTime | number: '1.0-2'}}</span>
</td>
<td *ngIf="displayColumn(itemData.userSettings?.requestStats?.standardDeviation)"><span
[className]="comparedData ? _.standardDeviation > 0 ? 'value-positive' : 'value-negative' : ''">{{_.standardDeviation | number: '1.0-2'}}</span>
</td>
<td *ngIf="displayColumn(itemData.userSettings?.requestStats?.min)"><span
[className]="comparedData ? _.minResponseTime > 0 ? 'value-positive' : 'value-negative' : ''">{{_.minResponseTime | number: '1.0-2'}}</span>
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ describe("RequestStatsCompareComponent", () => {
min: true,
p95: true,
apdex: true,
standardDeviation: true,
}
},
baseId: "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ export class RequestStatsCompareComponent implements OnInit, OnDestroy {
avg: true, min: true,
max: true, p90: true, p95: true,
p99: true, throughput: true, network: true,
errorRate: true }
errorRate: true, standardDeviation: true }
} = this.itemData.userSettings;
const dataToBeSaved = this.labelsData.map((label) => {
return {
Expand Down
1 change: 1 addition & 0 deletions src/app/scenario.service.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ export interface RequestStats {
samples: boolean
throughput: boolean
apdex: boolean
standardDeviation: boolean
}
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,11 @@ <h6>Generate extra chart aggregations <i class="fas fa-flask"></i></h6>
formControlName="avg">
<label class="custom-control-label" for="rs-avg">Response Time [avg]</label>
</div>
<div class="custom-control custom-switch">
<input type="checkbox" class="custom-control-input" id="rs-std"
formControlName="standardDeviation">
<label class="custom-control-label" for="rs-std">Standard Deviation</label>
</div>
<div class="custom-control custom-switch">
<input type="checkbox" class="custom-control-input" id="rs-p90"
formControlName="p90">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export class SettingsScenarioComponent implements OnInit {
network: null,
errorRate: null,
apdex: null,
standardDeviation: null
};
apdexFormControls = {
apdexEnabled: null,
Expand Down Expand Up @@ -204,6 +205,7 @@ export class SettingsScenarioComponent implements OnInit {

this.requestStatsCormControls.samples = new FormControl(settings.userSettings.requestStats.samples, [Validators.required]);
this.requestStatsCormControls.avg = new FormControl(settings.userSettings.requestStats.avg, [Validators.required]);
this.requestStatsCormControls.standardDeviation = new FormControl(settings.userSettings.requestStats.standardDeviation || true, [Validators.required]);
this.requestStatsCormControls.min = new FormControl(settings.userSettings.requestStats.min, [Validators.required]);
this.requestStatsCormControls.max = new FormControl(settings.userSettings.requestStats.max, [Validators.required]);
this.requestStatsCormControls.p90 = new FormControl(settings.userSettings.requestStats.p90, [Validators.required]);
Expand Down Expand Up @@ -262,6 +264,7 @@ export class SettingsScenarioComponent implements OnInit {
network: this.requestStatsCormControls.network,
errorRate: this.requestStatsCormControls.errorRate,
apdex: this.requestStatsCormControls.apdex,
standardDeviation: this.requestStatsCormControls.standardDeviation,
});
this.labelFiltersForm = new FormGroup({});
this.apdexSettingsForm = new FormGroup({
Expand Down

0 comments on commit 2af9e39

Please sign in to comment.