perf: run CPU profile on constant count so that time numbers can be compared between runs
This commit is contained in:
parent
c0a99ee7b1
commit
e4a4ec840e
|
@ -139,8 +139,9 @@ export function main() {
|
||||||
return function(_) {
|
return function(_) {
|
||||||
window.console.profile(name);
|
window.console.profile(name);
|
||||||
var duration = 0;
|
var duration = 0;
|
||||||
|
var downCount = 200;
|
||||||
var count = 0;
|
var count = 0;
|
||||||
while(duration < 5000) {
|
while(downCount--) {
|
||||||
var start = window.performance.now();
|
var start = window.performance.now();
|
||||||
create(_);
|
create(_);
|
||||||
duration += window.performance.now() - start;
|
duration += window.performance.now() - start;
|
||||||
|
|
Loading…
Reference in New Issue