POE::Devel::Benchmarker - Benchmarking POE's performance ( acts more like a smoker )
perl -MPOE::Devel::Benchmarker -e 'benchmark()'
This package of tools is designed to benchmark POE's performace across different configurations. The current "tests" are:
This module is poorly documented now. Please give me some time to properly document it over time :)
Here's a simple outline to get you up to speed quickly. ( and smoking! )
Download+install the POE::Devel::Benchmarker package from CPAN
apoc@apoc-x300:~$ cpanp -i POE::Devel::Benchmarker
Go anywhere, and create the "parent" directory where you'll be storing test results + stuff. For this example, I have chosen to use ~/poe-benchmarker:
apoc@apoc-x300:~$ mkdir poe-benchmarker apoc@apoc-x300:~$ cd poe-benchmarker apoc@apoc-x300:~/poe-benchmarker$ mkdir poedists apoc@apoc-x300:~/poe-benchmarker$ cd poedists/ apoc@apoc-x300:~/poe-benchmarker/poedists$ perl -MPOE::Devel::Benchmarker::GetPOEdists -e 'getPOEdists( 1 )' ( go get a coffee while it downloads if you're on a slow link, ha! ) apoc@apoc-x300:~/poe-benchmarker/poedists$ cd.. apoc@apoc-x300:~/poe-benchmarker$ mkdir results
At this point you can start running the benchmark!
NOTE: the Benchmarker expects everything to be in the "local" directory!
apoc@apoc-x300:~$ cd poe-benchmarker apoc@apoc-x300:~/poe-benchmarker$ perl -MPOE::Devel::Benchmarker -e 'benchmark()' ( go sleep or something, this will take a while! )
This part of the documentation is woefully incomplete. Please look at the POE::Devel::Benchmarker::Analyzer module.
This module exposes only one subroutine, the benchmark() one. You can pass a hashref to it to set various options. Here is a list of the valid options:
This enables the "lite" tests which will not take up too much time.
default: true
This enables quiet mode which will not print anything to the console except for errors.
default: false
Automatically exports the benchmark() subroutine.
I need to finish this module so it will dump YAML structures along the raw output. That way we can easily parse the data and use it for nifty stuff like graphs or websites :)
BEWARE: please don't write any tools to analyze the dumps as of now, and give me some more time to complete this, because I probably will be tweaking the raw output a little to make the regexes less crazy!
We should be able to run the benchmark over different Perl versions. This would require some fiddling with our layout + logic. It's not that urgent because the workaround is to simply execute the smoke suite under a different perl binary. It's smart enough to use $^X to be consistent across tests :)
<Khisanth> and if you are benchmarking, try it with POE using EV with EV using Glib? :P <Apocalypse> I'm not sure how to configure the EV "backend" yet <Apocalypse> too much docs for me to read hah <Khisanth> Apocalypse: use EV::Glib; use Glib; use POE; :)
Currently we blindly move on and test with/without this. We should be smarter and not waste one extra test per iteration if it isn't installed!
Currently we depend on the litetests option and hardcode some values including the timeout. If your machine is incredibly slow, there's a chance that it could timeout unnecessarily. Please look at the outputs and check to see if there are unusual failures, and inform me.
Also, some loops perform badly and take almost forever! /me glares at Gtk...
As I don't have access to a *BSD box, I cannot really test this. Furthermore, it isn't clear on how I can force/unload this module from POE...
POE
Apocalypse <apocal@cpan.org>
BIG THANKS goes to Rocco Caputo <rcaputo@cpan.org> for the first benchmarks!
Copyright 2008 by Apocalypse
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install POE::Devel::Benchmarker, copy and paste the appropriate command in to your terminal.
cpanm
cpanm POE::Devel::Benchmarker
CPAN shell
perl -MCPAN -e shell install POE::Devel::Benchmarker
For more information on module installation, please visit the detailed CPAN module installation guide.