Add linkdup_db to statistics
This commit is contained in:
parent
270c64e758
commit
19b0faad02
|
@ -717,6 +717,8 @@ sub linkdup {
|
|||
}
|
||||
|
||||
}
|
||||
my $tdb0 = gettimeofday();
|
||||
my $tdb1;
|
||||
my $sth = $self->{dbh}->prepare("select * from versions2, instances, files, sessions
|
||||
where file_type=? and file_size=? and file_mtime=?
|
||||
and file_owner=? and file_group=? and file_acl=?
|
||||
|
@ -738,6 +740,10 @@ sub linkdup {
|
|||
my $st = stat($backup_filename);
|
||||
my $my_dev = defined $st ? $st->dev : "";
|
||||
while (my $r = $sth->fetchrow_hashref()) {
|
||||
unless ($tdb1) {
|
||||
$tdb1 = gettimeofday();
|
||||
$self->{times}{linkdup_db} += $tdb1 - $tdb0;
|
||||
}
|
||||
|
||||
# check if old file is on same device. If it isn't, skip it.
|
||||
# XXX - this should now be obsolete because we already selected only matching sessions above.
|
||||
|
@ -780,6 +786,11 @@ sub linkdup {
|
|||
}
|
||||
my $t1 = gettimeofday();
|
||||
$self->{times}{linkdup} += $t1 - $t0;
|
||||
unless ($tdb1) {
|
||||
$tdb1 = gettimeofday();
|
||||
$self->{times}{linkdup_db} += $tdb1 - $tdb0;
|
||||
}
|
||||
$self->{counts}{linkdup_miss}++;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue