line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
2
|
|
|
2
|
|
19287
|
use 5.008; # utf8 |
|
2
|
|
|
|
|
8
|
|
2
|
2
|
|
|
2
|
|
12
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
53
|
|
3
|
2
|
|
|
2
|
|
8
|
use warnings; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
73
|
|
4
|
2
|
|
|
2
|
|
1264
|
use utf8; |
|
2
|
|
|
|
|
23
|
|
|
2
|
|
|
|
|
11
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
package CHI::Driver::LMDB::t::CHIDriverTests; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '0.002004'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
# ABSTRACT: Test suite for LMDB driver |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY |
13
|
|
|
|
|
|
|
|
14
|
2
|
|
|
2
|
|
1120
|
use CHI::Test; |
|
2
|
|
|
|
|
749211
|
|
|
2
|
|
|
|
|
10
|
|
15
|
2
|
|
|
2
|
|
36856
|
use Carp qw( carp ); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
67
|
|
16
|
2
|
|
|
2
|
|
1239
|
use Path::Tiny; |
|
2
|
|
|
|
|
15871
|
|
|
2
|
|
|
|
|
94
|
|
17
|
2
|
|
|
2
|
|
719
|
use parent qw( CHI::t::Driver ); |
|
2
|
|
|
|
|
402
|
|
|
2
|
|
|
|
|
9
|
|
18
|
|
|
|
|
|
|
|
19
|
0
|
|
|
0
|
|
|
sub testing_driver_class { return 'CHI::Driver::LMDB' } |
20
|
0
|
|
|
0
|
|
|
sub supports_get_namespaces { return 0 } |
21
|
|
|
|
|
|
|
|
22
|
2
|
|
|
2
|
|
224906
|
use LMDB_File qw( MDB_NOSYNC MDB_NOMETASYNC ); |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
my $tempdir = Path::Tiny->tempdir; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
if ( $ENV{CHI_KEEP_TEMP_DIR} ) { |
27
|
|
|
|
|
|
|
$tempdir->[Path::Tiny::TEMP]->unlink_on_destroy(0); |
28
|
|
|
|
|
|
|
carp "Tempdir kept at $tempdir"; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
my $extra_options = { |
31
|
|
|
|
|
|
|
mapsize => 15 * 1024 * 1024, |
32
|
|
|
|
|
|
|
## no critic (Bangs::ProhibitBitwiseOperators) |
33
|
|
|
|
|
|
|
flags => MDB_NOSYNC | MDB_NOMETASYNC, |
34
|
|
|
|
|
|
|
}; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub new_cache_options { |
37
|
|
|
|
|
|
|
my $self = shift; |
38
|
|
|
|
|
|
|
return ( |
39
|
|
|
|
|
|
|
root_dir => $tempdir, |
40
|
|
|
|
|
|
|
%{$extra_options}, |
41
|
|
|
|
|
|
|
$self->SUPER::new_cache_options(), |
42
|
|
|
|
|
|
|
); |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
1; |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
__END__ |