From 58b8ab7403e1ca7d1dd076de9346dc44874d0733 Mon Sep 17 00:00:00 2001 From: hjp Date: Thu, 20 May 2010 09:24:54 +0000 Subject: [PATCH] finer grained profiling of versions2 handling --- lib/Simba/CA.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/Simba/CA.pm b/lib/Simba/CA.pm index 4000da3..1429cb2 100644 --- a/lib/Simba/CA.pm +++ b/lib/Simba/CA.pm @@ -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},