Skip to content

Instantly share code, notes, and snippets.

@mohammadhb
Last active June 22, 2019 08:13
Show Gist options
  • Save mohammadhb/9703fd7739802b0d05faa22c3e493f60 to your computer and use it in GitHub Desktop.
Save mohammadhb/9703fd7739802b0d05faa22c3e493f60 to your computer and use it in GitHub Desktop.
const {performance} = require('perf_hooks');
const start = performance.now();
//Your Code Lays Here :)
const end = performance.now();
/*
cte : Constant to make 0 < (end-start) < 1 when there is no code
* it's just for better understanding ( if you dont want it leave it to be )
*/
const cte = 1;
console.log(`Performance : ${(end-start)*cte}`)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment