Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Re: Search Timer

Quote Reply
Re: Search Timer In reply to
Hi,

Try replacing:

my $results = GT::Plugins->dispatch ($CFG->{admin_root_path} . '/Plugins', 'search_results', \&query, {});

with:

_time_start();
my $results = GT::Plugins->dispatch ($CFG->{admin_root_path} . '/Plugins', 'search_results', \&query, {});
$results->{query_time} = _time_display();

and copy and paste _time_start and _time_display to search.cgi and add:

use vars qw/$TIME_START/;

to your code. You can then access the time using <%query_time%>.

A plugin would be a better solution, using a pre hook to start the timer and a post hook to stop the timer (as then you don't need to edit any code).

Cheers,

Alex

--
Gossamer Threads Inc.
Subject Author Views Date
Thread Search Timer Paul 7140 Dec 26, 2000, 5:45 PM
Thread Re: Search Timer
pugdog 7022 Dec 26, 2000, 9:35 PM
Thread Re: Search Timer
Paul 7003 Dec 27, 2000, 4:32 AM
Thread Re: Search Timer
pugdog 7004 Dec 27, 2000, 4:54 AM
Thread Re: Search Timer
Paul 6991 Dec 27, 2000, 5:00 AM
Thread Re: Search Timer
pugdog 7006 Dec 27, 2000, 5:02 AM
Thread Re: Search Timer
Paul 7003 Dec 27, 2000, 5:05 AM
Thread Re: Search Timer
Alex 6991 Dec 27, 2000, 12:46 PM
Post Re: Search Timer
Paul 6965 Dec 27, 2000, 12:51 PM
Thread Re: Search Timer
Paul 6989 Dec 27, 2000, 12:57 PM
Thread Re: Search Timer
Alex 6968 Dec 27, 2000, 1:05 PM
Thread Re: Search Timer
Paul 7041 Dec 27, 2000, 1:37 PM
Thread Re: Search Timer
Alex 6987 Dec 27, 2000, 2:52 PM
Thread Re: Search Timer
Paul 7019 Dec 27, 2000, 2:56 PM
Thread Re: Search Timer
Alex 6992 Dec 27, 2000, 3:04 PM
Post Re: Search Timer
Paul 6969 Dec 27, 2000, 3:08 PM
Post Re: Search Timer
Paul 6948 Dec 27, 2000, 3:13 PM
Thread Re: Search Timer
Paul 6970 Dec 27, 2000, 3:37 PM
Post Re: Search Timer
Paul 6980 Dec 27, 2000, 3:51 PM
Post Re: Search Timer
Paul 6974 Dec 27, 2000, 4:25 PM
Post Re: Search Timer
Paul 6971 Dec 27, 2000, 5:13 PM
Post Re: Search Timer
Paul 6999 Dec 27, 2000, 3:29 PM