Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
33 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,19 @@ | ||
# Little script used to run benchmarks against dev.localhost.localdomain | ||
# | ||
# To profile, run "perl -d:NYTProf benchmark.pl" | ||
use Devel::Leak::Object qw(GLOBAL_bless); | ||
$Devel::Leak::Object::TRACKSOURCELINES = 1; | ||
|
||
use lib '/data/WebGUI/lib'; | ||
use WebGUI; | ||
use Plack::Test; | ||
use Plack::Builder; | ||
use HTTP::Request::Common; | ||
my $wg = WebGUI->new( root => '/data/WebGUI', site => 'dev.localhost.localdomain.conf' ); | ||
my $app = $wg->psgi_app; | ||
my $app = builder { | ||
enable '+WebGUI::Middleware::Session', config => $wg->config; | ||
$wg; | ||
}; | ||
|
||
test_psgi $app, sub { | ||
my $cb = shift; | ||
my $res = $cb->( GET "/" ); | ||
} for 1..100; | ||
$cb->( GET "/" ) for 1..1000; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/usr/bin/perl | ||
use Plack::Server::FCGI; | ||
|
||
my $app = Plack::Util::load_psgi("/data/WebGUI/etc/dev.localhost.localdomain.psgi"); | ||
my $app = Plack::Util::load_psgi("../app.psgi"); | ||
Plack::Server::FCGI->new->run($app); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters