Skip to content

Commit

Permalink
Fix: request stats table - sort by network (#304)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeknovy authored Jan 27, 2023
1 parent b6f0690 commit 139c58e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ <h6 class="card-header bg-transparent">Request Statistics <span class="compare">
<mfDefaultSorter by="throughput">reqs/s {{defaultUnit ? "" : "[%]" }}</mfDefaultSorter>
</th>
<th scope="col" class="hd jtl-head-color" *ngIf="displayColumn(itemData.userSettings?.requestStats?.network)">
<mfDefaultSorter by="bytes">network [{{ defaultUnit ? "mbps" : "%" }}]</mfDefaultSorter>
<mfDefaultSorter [by]="sortByNetwork">network [{{ defaultUnit ? "mbps" : "%" }}]</mfDefaultSorter>
</th>
<th scope="col" class="hd jtl-head-color" *ngIf="displayColumn(itemData.userSettings?.requestStats?.errorRate)">
<mfDefaultSorter by="errorRate">error rate [%]</mfDefaultSorter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,10 @@ export class RequestStatsCompareComponent implements OnInit, OnDestroy {
return roundNumberTwoDecimals(((item.apdex.satisfaction + ( item.apdex.toleration * 0.5)) / item.samples))
}

public sortByNetwork(item) {
return roundNumberTwoDecimals(item.bytesPerSecond + item.bytesSentPerSecond)
}

private apdexScore(apdexValue: number): string {
const score = [
{ rangeFrom: 0.94, rangeTo: 1, name: "Excellent" },
Expand Down

0 comments on commit 139c58e

Please sign in to comment.