finer grained profiling of versions2 handling
This commit is contained in:
parent
1452afe110
commit
58b8ab7403
|
@ -419,6 +419,8 @@ sub db_record_version {
|
||||||
);
|
);
|
||||||
$f->{checksum} = $db_pv->[0]{checksum};
|
$f->{checksum} = $db_pv->[0]{checksum};
|
||||||
}
|
}
|
||||||
|
my $t2a = gettimeofday();
|
||||||
|
$self->{times}{db_record_version_versions2_get_checksum} += $t2a - $t2;
|
||||||
|
|
||||||
my $query =
|
my $query =
|
||||||
"select id from versions2
|
"select id from versions2
|
||||||
|
@ -444,6 +446,8 @@ sub db_record_version {
|
||||||
}
|
}
|
||||||
|
|
||||||
my $version_id = $self->{dbh}->selectrow_array($query, {}, @args);
|
my $version_id = $self->{dbh}->selectrow_array($query, {}, @args);
|
||||||
|
my $t2b = gettimeofday();
|
||||||
|
$self->{times}{db_record_version_versions2_get_version_id} += $t2b - $t2a;
|
||||||
unless ($version_id) {
|
unless ($version_id) {
|
||||||
# XXX why is $f->{checksum} undef here for ./bin/dash?
|
# XXX why is $f->{checksum} undef here for ./bin/dash?
|
||||||
$self->{dbh}->do("insert into versions2(
|
$self->{dbh}->do("insert into versions2(
|
||||||
|
@ -471,6 +475,7 @@ sub db_record_version {
|
||||||
}
|
}
|
||||||
my $t3 = gettimeofday();
|
my $t3 = gettimeofday();
|
||||||
$self->{times}{db_record_version_versions2} += $t3 - $t2;
|
$self->{times}{db_record_version_versions2} += $t3 - $t2;
|
||||||
|
$self->{times}{db_record_version_versions2_insert} += $t3 - $t2b;
|
||||||
push @{ $self->{caches}{insert_instances} },
|
push @{ $self->{caches}{insert_instances} },
|
||||||
[
|
[
|
||||||
$db_f->[0]{id},
|
$db_f->[0]{id},
|
||||||
|
|
Loading…
Reference in New Issue