Conversation
| } | ||
|
|
||
| void testMain() { | ||
| setUpAll(() async { |
There was a problem hiding this comment.
This test gives an error for ios-safari. logs
00:15 �[32m+363�[0m�[33m ~157�[0m�[31m -1�[0m: test/canvaskit/frame_timings_test.dart: (setUpAll) �[1m�[31m[E]�[0m�[0m
ReferenceError: Can't find variable: WebAssembly
../src/engine/canvaskit/initialization.dart 37:5
Can we skip the test? Safari desktop tests are passing btw.
| frameDone.complete(); | ||
| }; | ||
|
|
||
| // Frame 1 |
There was a problem hiding this comment.
nit: I have told all comments have to end with a '.' (same for frame 2)
| await frameDone.future; | ||
| expect(timings, hasLength(2), reason: '100 ms passed. 2 frames pumped.'); | ||
| for (final ui.FrameTiming timing in timings) { | ||
| expect(timing.vsyncOverhead, greaterThanOrEqualTo(Duration.zero)); |
There was a problem hiding this comment.
question: Is there a logical limit we can add? Or the value being more than zero is the only condition we are sure of.
There was a problem hiding this comment.
The test runs in real-time, so the actual number is unpredictable. Setting any upper limit may result in flakiness.
| /// | ||
| /// This also means different things between HTML and CanvasKit renderers. | ||
| /// | ||
| /// In HTML "rasterization" only captures DOM updates, but not work that |
| } | ||
| } | ||
|
|
||
| /// Current timestamp in microseconds taken from the high-precision |
There was a problem hiding this comment.
I don't know how we are going to save/upload these values once we are running the tests. I remember we mentioned in the future we want to run them in Firefox as well. I found this comment for firefox in the mozilla docs. We might want to keep it somewhere: "Firefox rounds the returned time to 1 millisecond increments."
There was a problem hiding this comment.
In the "Reduced time precision" section they explain how you can enable high precision timers. Worst case we just ignore data from Firefox if it's not useful.
|
Responded to all comments. PTAL. |
nturgut
left a comment
There was a problem hiding this comment.
LGTM. Thanks for adding me as a reviewer.
* web: implement frame timings
Implement
window.onReportTimingsfor web.