Cache::Profile::Compare - Compare several caches
version 0.05
my $c = Cache::Profile::Compare->new( caches => [ Cache::Bounded->new({ interval => 256, size => 1024 }), Cache::Ref::LRU->new( size => 1024 ), Cache::Ref::CART->new( size => 1024 ), ], ); # use normally $c->get("foo"); $c->set("foo" => 42); # reports which cache had the best hit rate, and which provided the best # speedup $c->report;
This module lets you compare several profiles.
The caches to profile
A lazy built list of Cache::Profile or Cache::Profile::CorrelateMissTiming objects based on caches.
caches
Can be provided explicitly if you want to create your own profiler objects.
Defaults to Cache::Profile::CorrelateMissTiming.
Prints the reports of the cache with the largest speedup and the cache with the best hit rate.
Returns the caches sorted by speedup.
Returns the caches sorted by hit rate.
Bugs may be submitted through the RT bug tracker (or bug-Cache-Profile@rt.cpan.org).
יובל קוג'מן (Yuval Kogman) <nothingmuch@woobling.org>
This software is copyright (c) 2010 by יובל קוג'מן (Yuval Kogman).
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Cache::Profile, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Cache::Profile
CPAN shell
perl -MCPAN -e shell install Cache::Profile
For more information on module installation, please visit the detailed CPAN module installation guide.