use the thing what dbs is writing right now collab/senator/timing
authorLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Wed, 25 Apr 2012 19:18:53 +0000 (15:18 -0400)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Wed, 25 Apr 2012 19:18:53 +0000 (15:18 -0400)
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm
Open-ILS/src/templates/opac/parts/footer.tt2

index 9150480..af1c3fc 100644 (file)
@@ -14,6 +14,7 @@ sub load_record {
     my $ctx = $self->ctx;
     $ctx->{page} = 'record';  
 
+    $self->timelog("load_record() began");
     my $org = $self->_get_search_lib();
     my $org_name = $ctx->{get_aou}->($org)->shortname;
     my $pref_ou = $self->_get_pref_lib();
@@ -35,8 +36,10 @@ sub load_record {
     if ($ctx->{staff_saved_search_size}) {
         $ctx->{saved_searches} = ($self->staff_load_searches)[1];
     }
+    $self->timelog("past staff saved searches");
 
     $self->fetch_related_search_info($rec_id);
+    $self->timelog("past related search info");
 
     # run copy retrieval in parallel to bib retrieval
     # XXX unapi
@@ -52,10 +55,13 @@ sub load_record {
         depth => $depth,
         pref_lib => $pref_ou
     });
+
+    $self->timelog("past get_records_and_facets()");
     $ctx->{bre_id} = $rec_data[0]->{id};
     $ctx->{marc_xml} = $rec_data[0]->{marc_xml};
 
     $ctx->{copies} = $copy_rec->gather(1);
+    $self->timelog("past store copy retrieval call");
     $ctx->{copy_limit} = $copy_limit;
     $ctx->{copy_offset} = $copy_offset;
 
@@ -64,6 +70,7 @@ sub load_record {
 
     $self->get_hold_copy_summary($rec_id, $org);
 
+    $self->timelog("past get_hold_copy_summary()");
     $self->ctx->{bib_is_dead} = OpenILS::Application::AppUtils->is_true(
         OpenILS::Utils::CStoreEditor->new->json_query({
             select => { bre => [ 'deleted' ] },
@@ -91,6 +98,8 @@ sub load_record {
         };
     }
 
+    $self->timelog("past serials holding stuff");
+
     my %expandies = (
         marchtml => sub {
             $ctx->{marchtml} = $self->mk_marc_html($rec_id);
@@ -116,6 +125,7 @@ sub load_record {
         }
     }
 
+    $self->timelog("past expandies");
     return Apache2::Const::OK;
 }
 
index ce60628..76c6b7a 100644 (file)
@@ -9,7 +9,14 @@
     <a href="http://example.com">[% l('Bottom Link 3') %]</a> &nbsp;|&nbsp;
     <a href="http://example.com">[% l('Bottom Link 4') %]</a> &nbsp;|&nbsp;
     <a href="http://example.com">[% l('Bottom Link 5') %]</a>
-
+    [% IF ctx.timing %]
+    <div id="timing">
+        [% FOR event IN ctx.timing %]
+        At <span class="timing-time">[% event.0 | format("%0.4f") %]</span>:
+        <span class="timing-event">[% event.1 %]</span><br />
+        [% END %]
+    </div>
+    [% END %]
     <div id="copyright_text" style="margin-top: 2em;">
         [% l('Copyright &copy; 2006-[_1] Georgia Public Library Service, and others', date.format(date.now, '%Y')) %]
     </div>