Bug 235325 - Add a data URL resource loader performance test
Summary: Add a data URL resource loader performance test
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Peng Liu
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-01-18 12:39 PST by Peng Liu
Modified: 2022-01-19 12:01 PST (History)
7 users (show)

See Also:


Attachments
Patch (4.08 KB, patch)
2022-01-18 12:57 PST, Peng Liu
eric.carlson: review+
Details | Formatted Diff | Diff
[fast-cq] Patch for landing (4.17 KB, patch)
2022-01-18 13:48 PST, Peng Liu
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peng Liu 2022-01-18 12:39:12 PST
We fixed bug #234940 but did not add a regression test.
Comment 1 Peng Liu 2022-01-18 12:57:51 PST
Created attachment 449412 [details]
Patch
Comment 2 Eric Carlson 2022-01-18 13:12:58 PST
Comment on attachment 449412 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=449412&action=review

> LayoutTests/media/video-src-blob-perf.html:19
> +                        failTest("Loading a data URL takes too long time.");

It might be helpful to log the multiple when the test fails, to help diagnose failures in case the test is flaky in some situations.

> LayoutTests/media/video-src-blob-perf.html:43
> +                video1.src = url;
> +                start1 = Date.now();

It might be more accurate to set the source of both elements after the data url has been created.

> LayoutTests/media/video-src-blob-perf.html:60
> +                setTimeout(() => failTest("Cannot complete the test in 5 seconds."), 5000);

Even normal tests sometimes take more than five seconds on a heavily loaded bot, so I would increase the timeout significantly (10 sec?)
Comment 3 Peng Liu 2022-01-18 13:45:25 PST
Comment on attachment 449412 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=449412&action=review

>> LayoutTests/media/video-src-blob-perf.html:19
>> +                        failTest("Loading a data URL takes too long time.");
> 
> It might be helpful to log the multiple when the test fails, to help diagnose failures in case the test is flaky in some situations.

Good point! Will fix it.

>> LayoutTests/media/video-src-blob-perf.html:43
>> +                start1 = Date.now();
> 
> It might be more accurate to set the source of both elements after the data url has been created.

Agree. Actually, after this change, the multiple is about 2 in my local tests.

>> LayoutTests/media/video-src-blob-perf.html:60
>> +                setTimeout(() => failTest("Cannot complete the test in 5 seconds."), 5000);
> 
> Even normal tests sometimes take more than five seconds on a heavily loaded bot, so I would increase the timeout significantly (10 sec?)

Good point!
Comment 4 Peng Liu 2022-01-18 13:48:13 PST
Created attachment 449418 [details]
[fast-cq] Patch for landing
Comment 5 EWS 2022-01-19 11:45:28 PST
Committed r288221 (246181@main): <https://commits.webkit.org/246181@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 449418 [details].
Comment 6 Radar WebKit Bug Importer 2022-01-19 12:01:15 PST
<rdar://problem/87784063>