I'm writing some unit tests using mocha and want to do a micro benchmark around a piece of code
Something like this
const startTime = getTime();
doOperations();
const endTime = getTime();
console.log(startTime - endTime);
is this possible in Javascript / nodejs / mocha?
I'd like to run this in my test environment just to check speed of some critical operations on nodejs server side