add percentile information if available
This commit is contained in:
@@ -12,10 +12,38 @@ export class PlotDetailsComponent {
|
||||
@Input()
|
||||
stats: PlotResponseStats;
|
||||
|
||||
hasPercentiles = false;
|
||||
|
||||
valueFormat = "time";
|
||||
|
||||
percentilesToPlot : Map<string,string> = new Map();
|
||||
|
||||
constructor(public utils: UtilService){
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.hasPercentiles = false;
|
||||
this.percentilesToPlot.clear();
|
||||
for (let i = 0; i < this.stats.dataSeriesStats.length; i++)
|
||||
{
|
||||
const stat = this.stats.dataSeriesStats[i];
|
||||
if (stat.percentiles.hasOwnProperty("50.000"))
|
||||
{
|
||||
this.hasPercentiles = true;
|
||||
this.percentilesToPlot.set('median','50.000');
|
||||
this.percentilesToPlot.set('75th','75.000');
|
||||
this.percentilesToPlot.set('95th','95.000');
|
||||
this.percentilesToPlot.set('99th','99.000');
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
percentile(value: number): string {
|
||||
return this.utils.format(value, this.valueFormat);
|
||||
}
|
||||
|
||||
pointTypeClass(typeAndColor: DashTypeAndColor): string {
|
||||
return "plot-details-plotType"
|
||||
+" plot-details-plotType_"+typeAndColor.pointType
|
||||
|
||||
Reference in New Issue
Block a user