finer grained profiling of versions2 handling

This commit is contained in:
hjp 2010-05-20 09:24:54 +00:00
parent 1452afe110
commit 58b8ab7403
1 changed files with 5 additions and 0 deletions

View File

@ -419,6 +419,8 @@ sub db_record_version {
);
$f->{checksum} = $db_pv->[0]{checksum};
}
my $t2a = gettimeofday();
$self->{times}{db_record_version_versions2_get_checksum} += $t2a - $t2;
my $query =
"select id from versions2
@ -444,6 +446,8 @@ sub db_record_version {
}
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) {
# XXX why is $f->{checksum} undef here for ./bin/dash?
$self->{dbh}->do("insert into versions2(
@ -471,6 +475,7 @@ sub db_record_version {
}
my $t3 = gettimeofday();
$self->{times}{db_record_version_versions2} += $t3 - $t2;
$self->{times}{db_record_version_versions2_insert} += $t3 - $t2b;
push @{ $self->{caches}{insert_instances} },
[
$db_f->[0]{id},