I would like to check the time for some of my function, and use console.time() in Javascript. Is it possible to use this function on the contest ? If yes, how can we implement it ?
Currenlty, I add at the beginning of my function :
According to the documentation, console.timeEnd() will log out in stdout. No really a good thing for a codingame puzzle since we use stderr for debug logs.
I can suggest you to move to the perf_hooks module.
You can also read the documentation to learn how PerformanceEntry and PerformanceObserver works. Pretty useful tool when you have to monitor a Nodejs code performances.