@@ -313,36 +313,36 @@ func (r *LoadResult) SummaryTable() string {
313313
314314 if r .ProfileRun != nil && len (r .ProfileRun .SegmentTimings ) > 0 {
315315 s .WriteString ("\n " )
316- s .WriteString (fmt .Sprintf ("%-30s %8s %8s %8s %8s %8s\n " , "SEGMENT" , "COUNT" , "MEAN" , "P50" , "P95" , "MAX" ))
317- s .WriteString ("─────────────────────────────────────────────────────────────────────\n " )
318-
319- for _ , seg := range []Segment {
320- SegmentTotalE2E ,
321- SegmentParse ,
322- SegmentReserve ,
323- SegmentRoute ,
324- SegmentQueueWait ,
325- SegmentEncrypt ,
326- SegmentDispatch ,
327- SegmentCoordinatorToProvider ,
328- SegmentTTFT ,
329- } {
330- durations , ok := r .ProfileRun .SegmentTimings [seg ]
331- if ! ok || len (durations ) == 0 {
332- continue
333- }
334- stats := computeStats (durations )
335- precision := time .Millisecond
336- if stats .Max < time .Millisecond {
337- precision = time .Microsecond
338- }
339- s .WriteString (fmt .Sprintf ("%-30s %8d %8s %8s %8s %8s\n " ,
340- seg , stats .Count ,
341- stats .Mean .Round (precision ),
342- stats .Median .Round (precision ),
343- stats .P95 .Round (precision ),
344- stats .Max .Round (precision ),
345- ))
316+ s .WriteString (fmt .Sprintf ("%-30s %8s %8s %8s %8s %8s\n " , "SEGMENT" , "COUNT" , "MEAN" , "P50" , "P95" , "MAX" ))
317+ s .WriteString ("─────────────────────────────────────────────────────────────────────\n " )
318+
319+ for _ , seg := range []Segment {
320+ SegmentTotalE2E ,
321+ SegmentParse ,
322+ SegmentReserve ,
323+ SegmentRoute ,
324+ SegmentQueueWait ,
325+ SegmentEncrypt ,
326+ SegmentDispatch ,
327+ SegmentCoordinatorToProvider ,
328+ SegmentTTFT ,
329+ } {
330+ durations , ok := r .ProfileRun .SegmentTimings [seg ]
331+ if ! ok || len (durations ) == 0 {
332+ continue
333+ }
334+ stats := computeStats (durations )
335+ precision := time .Millisecond
336+ if stats .Max < time .Millisecond {
337+ precision = time .Microsecond
338+ }
339+ s .WriteString (fmt .Sprintf ("%-30s %8d %8s %8s %8s %8s\n " ,
340+ seg , stats .Count ,
341+ stats .Mean .Round (precision ),
342+ stats .Median .Round (precision ),
343+ stats .P95 .Round (precision ),
344+ stats .Max .Round (precision ),
345+ ))
346346 }
347347 }
348348
0 commit comments