-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBenchmark.pl
More file actions
executable file
·48 lines (36 loc) · 794 Bytes
/
Benchmark.pl
File metadata and controls
executable file
·48 lines (36 loc) · 794 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/perl
use strict;
use vars qw( $core );
use lib qw( /etc/apache2/perl );
#use lib qw( ./ );
#use Apache::RequestRec ();
#use Apache::RequestIO ();
use Apache::Const -compile => qw(OK DECLINED HTTP_UNAUTHORIZED SERVER_ERROR);
#use ModPerl::Util;
use Benchmark;
use eThreads::Object::Core;
if (0) {
my $core = new eThreads::Object::Core;
$core->cgi_enable;
for (1..20)
{
warn "it\n";
my $inst = $core->new_object("Instance",$core->cgi_r_handler);
$inst->go();
$inst->DESTROY;
}
}
if (1) {
my $core = new eThreads::Object::Core;
$core->cgi_enable;
timethis(60,sub {
my $inst = $core->new_object("Instance",$core->cgi_r_handler);
$inst->go();
$inst->DESTROY;
});
}
#----------
sub eThreads::Object::FakeRequestHandler::print {
return 1;
# print @_;
}