@@ -143,6 +143,20 @@ void main() {
143
143
return result;
144
144
}
145
145
146
+ Map <String , dynamic > frameRequestPendingStart (String id, int timeStamp) => < String , dynamic > {
147
+ 'name' : 'Frame Request Pending' ,
148
+ 'ph' : 'b' ,
149
+ 'id' : id,
150
+ 'ts' : timeStamp,
151
+ };
152
+
153
+ Map <String , dynamic > frameRequestPendingEnd (String id, int timeStamp) => < String , dynamic > {
154
+ 'name' : 'Frame Request Pending' ,
155
+ 'ph' : 'e' ,
156
+ 'id' : id,
157
+ 'ts' : timeStamp,
158
+ };
159
+
146
160
group ('frame_count' , () {
147
161
test ('counts frames' , () {
148
162
expect (
@@ -448,13 +462,19 @@ void main() {
448
462
expect (
449
463
summarize (< Map <String , dynamic >> [
450
464
begin (1000 ), end (19000 ),
451
- begin (19000 ), end (29000 ),
452
- begin (29000 ), end (49000 ),
465
+ begin (19001 ), end (29001 ),
466
+ begin (29002 ), end (49002 ),
453
467
...newGenGC (4 , 10 , 100 ),
454
468
...oldGenGC (5 , 10000 , 100 ),
455
469
frameBegin (1000 ), frameEnd (18000 ),
456
470
frameBegin (19000 ), frameEnd (28000 ),
457
471
frameBegin (29000 ), frameEnd (48000 ),
472
+ frameRequestPendingStart ('1' , 1000 ),
473
+ frameRequestPendingEnd ('1' , 2000 ),
474
+ frameRequestPendingStart ('2' , 3000 ),
475
+ frameRequestPendingEnd ('2' , 5000 ),
476
+ frameRequestPendingStart ('3' , 6000 ),
477
+ frameRequestPendingEnd ('3' , 9000 ),
458
478
]).summaryJson,
459
479
< String , dynamic > {
460
480
'average_frame_build_time_millis' : 15.0 ,
@@ -475,7 +495,7 @@ void main() {
475
495
'frame_build_times' : < int > [17000 , 9000 , 19000 ],
476
496
'frame_rasterizer_times' : < int > [18000 , 10000 , 20000 ],
477
497
'frame_begin_times' : < int > [0 , 18000 , 28000 ],
478
- 'frame_rasterizer_begin_times' : < int > [0 , 18000 , 28000 ],
498
+ 'frame_rasterizer_begin_times' : < int > [0 , 18001 , 28002 ],
479
499
'average_vsync_transitions_missed' : 0.0 ,
480
500
'90th_percentile_vsync_transitions_missed' : 0.0 ,
481
501
'99th_percentile_vsync_transitions_missed' : 0.0 ,
@@ -505,6 +525,9 @@ void main() {
505
525
'90hz_frame_percentage' : 0 ,
506
526
'120hz_frame_percentage' : 0 ,
507
527
'illegal_refresh_rate_frame_count' : 0 ,
528
+ 'average_frame_request_pending_latency' : 2000.0 ,
529
+ '90th_percentile_frame_request_pending_latency' : 3000.0 ,
530
+ '99th_percentile_frame_request_pending_latency' : 3000.0 ,
508
531
},
509
532
);
510
533
});
@@ -556,8 +579,8 @@ void main() {
556
579
test ('writes summary to JSON file' , () async {
557
580
await summarize (< Map <String , dynamic >> [
558
581
begin (1000 ), end (19000 ),
559
- begin (19000 ), end (29000 ),
560
- begin (29000 ), end (49000 ),
582
+ begin (19001 ), end (29001 ),
583
+ begin (29002 ), end (49002 ),
561
584
frameBegin (1000 ), frameEnd (18000 ),
562
585
frameBegin (19000 ), frameEnd (28000 ),
563
586
frameBegin (29000 ), frameEnd (48000 ),
@@ -569,6 +592,12 @@ void main() {
569
592
cpuUsage (5000 , 20 ), cpuUsage (5010 , 60 ),
570
593
memoryUsage (6000 , 20 , 40 ), memoryUsage (6100 , 30 , 45 ),
571
594
platformVsync (7000 ), vsyncCallback (7500 ),
595
+ frameRequestPendingStart ('1' , 1000 ),
596
+ frameRequestPendingEnd ('1' , 2000 ),
597
+ frameRequestPendingStart ('2' , 3000 ),
598
+ frameRequestPendingEnd ('2' , 5000 ),
599
+ frameRequestPendingStart ('3' , 6000 ),
600
+ frameRequestPendingEnd ('3' , 9000 ),
572
601
]).writeTimelineToFile ('test' , destinationDirectory: tempDir.path);
573
602
final String written =
574
603
await fs.file (path.join (tempDir.path, 'test.timeline_summary.json' )).readAsString ();
@@ -591,7 +620,7 @@ void main() {
591
620
'frame_build_times' : < int > [17000 , 9000 , 19000 ],
592
621
'frame_rasterizer_times' : < int > [18000 , 10000 , 20000 ],
593
622
'frame_begin_times' : < int > [0 , 18000 , 28000 ],
594
- 'frame_rasterizer_begin_times' : < int > [0 , 18000 , 28000 ],
623
+ 'frame_rasterizer_begin_times' : < int > [0 , 18001 , 28002 ],
595
624
'average_vsync_transitions_missed' : 8.0 ,
596
625
'90th_percentile_vsync_transitions_missed' : 12.0 ,
597
626
'99th_percentile_vsync_transitions_missed' : 12.0 ,
@@ -627,6 +656,9 @@ void main() {
627
656
'90hz_frame_percentage' : 0 ,
628
657
'120hz_frame_percentage' : 0 ,
629
658
'illegal_refresh_rate_frame_count' : 0 ,
659
+ 'average_frame_request_pending_latency' : 2000.0 ,
660
+ '90th_percentile_frame_request_pending_latency' : 3000.0 ,
661
+ '99th_percentile_frame_request_pending_latency' : 3000.0 ,
630
662
});
631
663
});
632
664
});
0 commit comments