Cache::Profile::Compare
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.
Cache::Profile::Compare - compare several caches
The caches to profile
A lazy built list of Cache::Profile or Cache::Profile::CorrelateMissTiming objects based on 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.
Yuval Kogman
This software is copyright (c) 2011 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.