more timing info
This commit is contained in:
parent
582cf47a11
commit
2bc2878dd3
|
@ -390,6 +390,8 @@ sub db_record_version {
|
|||
my $db_f = $self->{dbh}->selectall_arrayref("select * from files where fileset=? and path=?",
|
||||
{ Slice => {} },
|
||||
$target->{id}, $f->{name});
|
||||
my $t1 = gettimeofday();
|
||||
$self->{times}{db_record_version_select_files} += $t1 - $t0;
|
||||
unless (@$db_f) {
|
||||
$self->{dbh}->do("insert into files(fileset, path) values(?, ?)",
|
||||
{},
|
||||
|
@ -399,6 +401,8 @@ sub db_record_version {
|
|||
$target->{id}, $f->{name});
|
||||
|
||||
}
|
||||
my $t2 = gettimeofday();
|
||||
$self->{times}{db_record_version_insert_files} += $t2 - $t1;
|
||||
if ($f->{t} eq 'f' && !defined($f->{checksum})) {
|
||||
# this must be a link to the previous version
|
||||
my $db_pv = $self->{dbh}->selectall_arrayref(
|
||||
|
@ -460,6 +464,8 @@ sub db_record_version {
|
|||
);
|
||||
$version_id = $self->{dbh}->{mysql_insertid};
|
||||
}
|
||||
my $t3 = gettimeofday();
|
||||
$self->{times}{db_record_version_versions2} += $t3 - $t2;
|
||||
$self->{dbh}->do("insert into instances(file,
|
||||
file_id,
|
||||
date, online,
|
||||
|
@ -475,10 +481,12 @@ sub db_record_version {
|
|||
$self->{session_id}, $version_id
|
||||
);
|
||||
|
||||
my $t1 = gettimeofday();
|
||||
$self->{times}{db_record_version} += $t1 - $t0;
|
||||
my $t4 = gettimeofday();
|
||||
$self->{times}{db_record_version_insert_instances} += $t4 - $t3;
|
||||
$self->{times}{db_record_version} += $t4 - $t0;
|
||||
}
|
||||
|
||||
|
||||
sub new_session {
|
||||
my ($self) = @_;
|
||||
$self->{dbh}->do("insert into sessions(start_date, prefix) values(?, ?)", {}, time(), $self->{this_backup});
|
||||
|
|
Loading…
Reference in New Issue