NAME

LinkedList::Single::Example::Latency - per-call timing for the examples: percentiles, the worst call, and where it was

SYNOPSIS

use LinkedList::Single::Example::Latency qw( sample summary clock_floor in_child );

my $took    = sample( 100_000, sub( $i ) { $queue->enqueue( $i, 'job' ) } );
my $s       = summary( $took );        # mean p50 p99 p999 max (us), at

DESCRIPTION

The examples' best_of reports the best of a few runs, which is the right number for an average and the wrong one for a bound. These helpers time each call, and report the spread.