Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.

Benchmark running times of diferents languages in web programing

by shadox (Priest)
on Dec 05, 2001 at 10:25 UTC ( #129537=perlquestion: print w/replies, xml ) Need Help??

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)

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://129537]
Approved by root
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (6)
As of 2023-12-10 20:29 GMT
Find Nodes?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?

    Results (41 votes). Check out past polls.