Skip to content

Commit

Permalink
perf analysis response times (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeknovy authored Mar 12, 2021
1 parent 060efef commit 59ff64a
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 2 deletions.
11 changes: 10 additions & 1 deletion src/app/item-detail/item-detail.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,16 @@ <h6 class="overview-body perf-analysis">Performance Analysis</h6>
Steady response time performance</div>
<div *ngIf="perfAnalysis.variability.failed===true" class="perf-analaysis-desc text-secondary">
<small>Increased variability between the fastest and the average response time was detected (up to
{{perfAnalysis.variability.value}}x). The SUT might have been overloaded.</small>
{{perfAnalysis.variability.value}}x). The SUT might have been overloaded. </small> <button class="btn btn-sm btn-link-custom jtl-no-glow text-primary" (click)="toggleFoldRT($event.target)">Show more</button>

<div class="response-time-variability" [@panelState]="folded">
<div><small>Labels with highest variability:</small></div>
<div *ngFor="let _ of perfAnalysis.variability.failingLabels">
<li><small><strong>{{_.label}}</strong> shows <strong>{{_.variability}}x</strong> variability, while the minimum reponse time measured was <strong>{{_.minResponseTime}}ms</strong> and the average <strong>{{_.avgResponseTime}}ms</strong>.</small></li>
</div>
</div>


</div>
<div *ngIf="perfAnalysis.variability.failed===false" class="perf-analaysis-desc text-secondary">
<small>The SUT was providing balanced response times across all labels.</small>
Expand Down
5 changes: 5 additions & 0 deletions src/app/item-detail/item-detail.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -284,3 +284,8 @@ thead .hd {
.perf-analysis {
padding-bottom: 10px;
}

.response-time-variability {
margin-left: 10px;
}

22 changes: 21 additions & 1 deletion src/app/item-detail/item-detail.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,19 @@ import { SharedMainBarService } from '../shared-main-bar.service';
import { ToastrService } from 'ngx-toastr';
import { ItemStatusValue } from './item-detail.model';
import { logScaleButton } from '../graphs/log-scale-button';
import { animate, state, style, transition, trigger } from '@angular/animations';

@Component({
selector: 'app-item-detail',
templateUrl: './item-detail.component.html',
styleUrls: ['./item-detail.component.scss', '../shared-styles.css'],
animations : [
trigger('panelState', [
state('closed', style({ height: 0, overflow: 'hidden' })),
state('open', style({ height: '*' })),
transition('closed <=> open', animate('300ms ease-in-out')),
]),
],
providers: [DecimalPipe]
})
export class ItemDetailComponent implements OnInit {
Expand Down Expand Up @@ -68,6 +76,7 @@ export class ItemDetailComponent implements OnInit {
}
};
toggleThroughputBandFlag = false;
folded = 'closed';


constructor(
Expand Down Expand Up @@ -284,7 +293,8 @@ export class ItemDetailComponent implements OnInit {
value: variabilitySorted[0].variability,
avgResponseTime: variabilitySorted[0].avgResponseTime,
minResponseTime: variabilitySorted[0].minResponseTime,
failed: variabilitySorted[0].variability > 2.5
failed: variabilitySorted[0].variability > 2.5,
failingLabels: variabilitySorted.filter(_ => _.variability > 2.5)
},
onePerc: {
value: onePercSorted[0].onePerc,
Expand Down Expand Up @@ -362,6 +372,16 @@ export class ItemDetailComponent implements OnInit {
this.toggleThroughputBandFlag = false;
}
this.updateChartFlag = true;
}

toggleFoldRT(element) {
if (this.folded === 'open') {
this.folded = 'closed';
element.textContent = 'Show more';
return;
}
this.folded = 'open';
element.textContent = 'Show less';

}
}

0 comments on commit 59ff64a

Please sign in to comment.