-
Notifications
You must be signed in to change notification settings - Fork 13
.perf
Arthur Guiot edited this page Jan 13, 2018
·
2 revisions
This will take an initial value that is a function. This function will be run 15
times and will take the average execution time of this function to see if it's less than the desired time.
ms
eye.test("Performances", "node",
$ => $(() => {
let a = 1
for (var i = 0; i < 1000; i++) {
a += i
}
}).perf(10) // shouldn't run in more than 10 ms
)
Don't hesitate to ask your questions