perf: run CPU profile on constant count so that time numbers can be compared between runs

This commit is contained in:
Misko Hevery 2015-01-12 21:55:10 -08:00
parent c0a99ee7b1
commit e4a4ec840e
1 changed files with 2 additions and 1 deletions

View File

@ -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;