4 ms·
I've work for a company that lets people write their own Selenium scripts to test the performance their website. They use our service to monitor their website a
by mateo411 14y ago
I've work for a company that lets people write their own Selenium scripts to test the performance their website. They use our service to monitor their website at 100 different locations.
We solved the while(true){} by limiting the number of instructions the javascript program can run. To do this we use Rhino which is a Javascript implementation which runs in the JVM. It provides us a hook to get the instruction count.
We had to figure this out, since we let our customers run their own scripts on our network. If they write a script that never terminates, then they've hosed a machine on our network.