[wasm][bench] Limit initial samples (#86953)
authorRadek Doulik <radek.doulik@gmail.com>
Wed, 31 May 2023 14:25:35 +0000 (16:25 +0200)
committerGitHub <noreply@github.com>
Wed, 31 May 2023 14:25:35 +0000 (16:25 +0200)
commitd1bf019d010b69cba144d5582dcbcb85f449bdaa
tree42556e04e37d70e83e618c4c4da6133ea26a8385
parentfbf1f720554daef424edc3ced2e233729a626b4b
[wasm][bench] Limit initial samples (#86953)

* [wasm][bench] Limit initial samples

Try to limit initial samples measurement to 1 second.

Currently some of string measurements with hybrid globalization turned on
can take hundreds of seconds. This makes the browser stop the benchmark
and the measurement job times out.

This should limit the initial samples to take cca 1 second or take just
one initial sample if it takes more time.

Also increase the initial samples for string comparison, where it was on
the edge and the times were flipping between cca 5 and 10 seconds.

* Do GC collect only when doing initial samples
src/mono/sample/wasm/browser-bench/BenchTask.cs
src/mono/sample/wasm/browser-bench/String.cs
src/mono/sample/wasm/browser-bench/WebSocket.cs