Sarcasmo has asked for the
wisdom of the Perl Monks concerning the following question:
I am researching some things for an upcoming project at work, and I've been commissioned to find a way to keep track of how long code takes to execute. Why? The first example I showed to the person heading the project took forever to load because of his input. It's a form (I'm showing him that I can use the CGI module) that inputs a string in a text field, and then ravages it with regular expressions and random characters to make, basically, a big mess that's pretty. If you input a string without spaces (as he did), it takes longer to execute. I want to meter how long it takes and (I guess) output the run time.
So yeah, if anyone can tell me how to benchmark a script without using any modules (not counting CGI), please do. I've looked around and can't really find a good way to do it. To be honest, I don't even really have an idea...