I have a JavaScript file that takes an input, does some calculations with it, and returns a result. Now, I’d like to measure its performance, checking for example how much does it take to run 1.000 inputs. The problem is that I have nearly no knowledge of Javascript (the code isn’t mine, neither), so I don’t have any idea of how to do this. StackOverflowing I found some similar questions, but it’s about “how much does it take for the script to run once” rather than “how much does it take for the script to elaborate 1.000 inputs”.
If it can help, this is the script.
I would do something like this (depending on if the window console exists and has the time property):