The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

POE::Devel::Benchmarker::Utils - Various utility routines for POE::Devel::Benchmarker

SYNOPSIS

        perl -MPOE::Devel::Benchmarker::Utils -e 'print poeloop2load( "IO_Poll" )'

ABSTRACT

This package contains the utility routines and constants that POE::Devel::Benchmarker needs.

EXPORT

This package exports those subs via @EXPORT_OK:

poeloop2load()

Returns the "parent" class to load for a specific loop. An example is:

        $real = poeloop2load( 'IO_Poll' );      # $real now contains "IO::Poll"
loop2realversion()

Returns the version of the "parent" class for a specific loop. An example is:

        $ver = loop2realversion( 'IO_Poll' );   # $ver now contains $IO::Poll::VERSION
beautify_times()

Returns a hashref of data from parsing 2 consecutive times() structures in a string. You can pass an additional parameter ( boolean ) to include the original data. An example is:

        print Data::Dumper::Dumper( beautify_times( '0.1 0 0 0 0.1 0 0.76 0.09', 1 ) );
        {
                "sys" => 0,             # total system time
                "user" => 0,            # total user time
                "csys" => 0.76          # total children system time
                "cuser" => 0.08         # total children user time

                "e_csys" => "0.09",     # end children system time ( optional )
                "e_cuser" => "0.76",    # end children user time ( optional )
                "e_sys" => 0,           # end system time ( optional )
                "e_user" => "0.1",      # end user time ( optional )
                "s_csys" => 0,          # start children system time ( optional )
                "s_cuser" => 0,         # start children user time ( optional )
                "s_sys" => 0,           # start system time ( optional )
                "s_user" => "0.1"       # start user time ( optional )
        }

SEE ALSO

POE::Devel::Benchmarker

AUTHOR

Apocalypse <apocal@cpan.org>

COPYRIGHT AND LICENSE

Copyright 2008 by Apocalypse

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.