mirror of
https://github.com/konvajs/konva.git
synced 2025-11-18 17:21:36 +08:00
added performance test suite with two sample performance tests
This commit is contained in:
@@ -1,6 +1,18 @@
|
||||
var numTests = 0;
|
||||
var testCounter = null;
|
||||
var before, after;
|
||||
|
||||
function startTimer() {
|
||||
var date = new Date();
|
||||
before = date.getTime();
|
||||
|
||||
}
|
||||
function endTimer(str) {
|
||||
var date = new Date();
|
||||
after = date.getTime();
|
||||
var diff = after - before;
|
||||
console.log(str + ': ' + diff + 'ms');
|
||||
}
|
||||
function warn(condition, message) {
|
||||
test(condition, message, true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user