line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#!/usr/bin/perl |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
package KiokuDB::GC::Naive::Sweep; |
4
|
1
|
|
|
1
|
|
3
|
use Moose; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
6
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
4922
|
use namespace::clean -except => 'meta'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
10
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
with 'KiokuDB::Role::Scan' => { result_class => "KiokuDB::GC::Naive::Sweep::Results" }; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
{ |
11
|
|
|
|
|
|
|
package KiokuDB::GC::Naive::Sweep::Results; |
12
|
1
|
|
|
1
|
|
231
|
use Moose; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
13
|
|
|
|
|
|
|
|
14
|
1
|
|
|
1
|
|
4935
|
use Set::Object; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
212
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
has [qw(garbage)] => ( |
17
|
|
|
|
|
|
|
isa => "Set::Object", |
18
|
|
|
|
|
|
|
is => "ro", |
19
|
|
|
|
|
|
|
default => sub { Set::Object->new }, |
20
|
|
|
|
|
|
|
); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
has '+scan_ids' => ( default => 1 ); |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
has mark_results => ( |
28
|
|
|
|
|
|
|
isa => "KiokuDB::GC::Naive::Mark::Results", |
29
|
|
|
|
|
|
|
is => "ro", |
30
|
|
|
|
|
|
|
required => 1, |
31
|
|
|
|
|
|
|
handles => qr/.*/, |
32
|
|
|
|
|
|
|
); |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub process_block { |
35
|
9
|
|
|
9
|
0
|
29
|
my ( $self, %args ) = @_; |
36
|
|
|
|
|
|
|
|
37
|
9
|
|
|
|
|
21
|
my ( $ids, $res ) = @args{qw(block results)}; |
38
|
|
|
|
|
|
|
|
39
|
9
|
|
|
|
|
31
|
my $seen = $self->seen; |
40
|
|
|
|
|
|
|
|
41
|
9
|
|
|
|
|
28
|
my @garbage = grep { not $seen->includes($_) } @$ids; |
|
2020
|
|
|
|
|
3210
|
|
42
|
|
|
|
|
|
|
|
43
|
9
|
|
|
|
|
300
|
$res->garbage->insert(@garbage); |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
__PACKAGE__ |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
__END__ |