t/9benchmark/v6_bin.t
raw| 1 | use strict; |
| 2 | use warnings; |
| 3 | |
| 4 | BEGIN { |
| 5 | unless ( $ENV{TEST_VERBOSE} ) { |
| 6 | print "1..0 # SKIP not verbose\n"; |
| 7 | exit 0; |
| 8 | } |
| 9 | } |
| 10 | |
| 11 | use MyTest; |
| 12 | use MyTmpTimer; |
| 13 | use Benchmark qw(:hireswallclock countit); |
| 14 | use UUID 'generate_v6'; |
| 15 | |
| 16 | note ''; |
| 17 | note 'testing version 6 binary speed'; |
| 18 | |
| 19 | my $t = countit(1, 'generate_v6(my $x)'); |
| 20 | my $cnt = $t->iters; |
| 21 | |
| 22 | note 'rate = ', int_commify($cnt, 1), ' UUID binaries per second'; |
| 23 | note ''; |
| 24 | |
| 25 | ok 1, 'done'; |
| 26 | |
| 27 | done_testing; |