• Jackson Gardner's avatar
    Improve web benchmarks measurements (#127900) · e8f4d803
    Jackson Gardner authored
    By default, the browser fuzzes the timer APIs such that they have a granularity of approximately 100 microseconds (this is due to Spectre mitigation techniques). However, many of the thing we are trying to measure actually have a much finer granularity than 100 microseconds. As a result, many of our benchmarks are extremely noisy and don't provide accurate data.
    
    By serving the initial script files with the `Cross-Origin-Opener-Policy: same-origin` and `Cross-Origin-Embedder-Policy: require-corp` HTTP headers, the browser runs the benchmarks in a `crossOriginIsolated` context, which restores the fine granularity of APIs such as `performance.now()` to microsecond precision.
    
    Also, we were considering anything an outlier that was more than one standard deviation away from the mean. In a normal distribution, that means we are only capturing 68% of the data and the rest are considered outliers. This is not ideal. Doing two standard deviations away captures 95% of the data, and the outliers are in the remaining 5%, which seems much more reasonable.
    e8f4d803
Name
Last commit
Last update
..
analysis.dart Loading commit data...
android_choreographer_do_frame_test.dart Loading commit data...
android_lifecycles_test.dart Loading commit data...
build_test_task.dart Loading commit data...
dart_plugin_registry_tests.dart Loading commit data...
entrypoint_dart_registrant.dart Loading commit data...
flutter_tool_startup.dart Loading commit data...
gallery.dart Loading commit data...
hot_mode_tests.dart Loading commit data...
integration_tests.dart Loading commit data...
microbenchmarks.dart Loading commit data...
new_gallery.dart Loading commit data...
perf_tests.dart Loading commit data...
platform_channels_benchmarks.dart Loading commit data...
plugin_tests.dart Loading commit data...
run_tests.dart Loading commit data...
web_benchmarks.dart Loading commit data...
web_dev_mode_tests.dart Loading commit data...