From e4a4ec840e3ed60522c8cc33df3f95e36f4e6294 Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Mon, 12 Jan 2015 21:55:10 -0800 Subject: [PATCH] perf: run CPU profile on constant count so that time numbers can be compared between runs --- modules/benchmarks/src/tree/tree_benchmark.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/benchmarks/src/tree/tree_benchmark.js b/modules/benchmarks/src/tree/tree_benchmark.js index a8e34331e3..c98dd4099b 100644 --- a/modules/benchmarks/src/tree/tree_benchmark.js +++ b/modules/benchmarks/src/tree/tree_benchmark.js @@ -139,8 +139,9 @@ export function main() { return function(_) { window.console.profile(name); var duration = 0; + var downCount = 200; var count = 0; - while(duration < 5000) { + while(downCount--) { var start = window.performance.now(); create(_); duration += window.performance.now() - start;