יובל קוג'מן (Yuval Kogman) > Cache-Profile > Cache::Profile::Compare

Download:
Cache-Profile-0.02.tar.gz

Dependencies

Annotate this POD

Website

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.02   Source  

NAME ^

Cache::Profile::Compare

SYNOPSIS ^

    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;

DESCRIPTION ^

This module lets you compare several profiles.

NAME ^

Cache::Profile::Compare - compare several caches

ATTRIBUTES ^

caches

The caches to profile

profiles

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.

profile_class

Defaults to Cache::Profile::CorrelateMissTiming.

METHODS ^

report

Prints the reports of the cache with the largest speedup and the cache with the best hit rate.

by_speedup

Returns the caches sorted by speedup.

by_hit_rate

Returns the caches sorted by hit rate.

AUTHOR ^

Yuval Kogman

COPYRIGHT AND LICENSE ^

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.

syntax highlighting: