Don't use
var startDate = new Date();
/* lots of code here */
var timeTaken = newDate() - startDate;
use
console.time("Some Scenario");
/* lots of code here */
console.timeEnd("Some Scenario");