Log-Fmt-XS
view release on metacpan or search on metacpan
my $r = Log::Fmt->_pairs_to_kvstr_aref(\@input);
}
my $after = get_rss();
my $growth = $after - $before;
# Allow up to 128 KB of growth for noise (arena rounding, etc.)
my $max_growth = 128 * 1024;
cmp_ok($growth, '<=', $max_growth,
sprintf("memory growth after 100k iterations: %d bytes (limit %d)",
$growth, $max_growth));
if ($growth > $max_growth) {
diag sprintf("before: %d bytes, after: %d bytes, growth: %d bytes",
$before, $after, $growth);
}
( run in 0.500 second using v1.01-cache-2.11-cpan-71847e10f99 )