http://qs1969.pair.com?node_id=129537

shadox has asked for the wisdom of the Perl Monks concerning the following question:

Hi all, here i am again :)
Well, i will try to be as clear as i can.
Using the benchmark module , allow us to compare running times of Perl code, ok, now what i want to do is compare diferent programing languages, but just for web programing. Then, for example i have a perl , an asp and a php code. All of them will be in same machine, and all of them will do the same.
Ok now the question is, Is there already a way to do something like this?
And if there isn't, then can anyone give me some advice
about how to do that :) Thanx
Dreams they just disapear into the shadows,
then they become true....
  • Comment on Benchmark running times of diferents languages in web programing

Replies are listed 'Best First'.
Re: Benchmark running times of diferents languages in web programing
by Chmrr (Vicar) on Dec 05, 2001 at 10:33 UTC

    With all of the caveats of benchmarking not really being able to approximate real monkeys banging on your website, you probably want to look at ApacheBench, which essentially bangs on your website in place of monkeys. ApacheBench comes with Apache. There's a web gateway here, and some "hello world" (literally!) benchmarks here to get you started.

    Other tools are httperf and http_load.

    perl -pe '"I lo*`+$^X$\"$]!$/"=~m%(.*)%s;$_=$1;y^+*`^ ve^#$&V"+@( NO CARRIER'

Re: Benchmark running times of diferents languages in web programing
by fuzzysteve (Beadle) on Dec 05, 2001 at 17:16 UTC
    one way that comes to mind, it to use lwp to get each page, and benchmark the time it takes. not idea if the server is in use, as it lets other factors affect the times it takes to grab.
    Main reason to grab them this way, is that it gives a slightly better idea of speed, taking into account how long it takes for the total request to go though, not just the time the program takes to run. (if an external binary is called to process the request, thats a factor that should be considered for speed purposes.) (apachebench may do this, I havn't looked at it)