mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2024-12-22 21:00:23 +01:00
Added prepareOnce to performance test.
This commit is contained in:
parent
4d71d6bc02
commit
9f38703e84
@ -32,9 +32,14 @@ var performTest = function(){
|
||||
var min = Number.POSITIVE_INFINITY;
|
||||
var max = 0;
|
||||
var outerI = 0;
|
||||
if (func.prepareOnce){
|
||||
func.prepareOnce();
|
||||
}
|
||||
function run(){
|
||||
for (var i = 0; i < innerRunLength; i += 1){
|
||||
if (func.prepare){
|
||||
func.prepare();
|
||||
}
|
||||
var start = performance.now();
|
||||
func.test();
|
||||
var end = performance.now();
|
||||
|
Loading…
x
Reference in New Issue
Block a user