Changeset 17885
- Timestamp:
- 08/19/08 07:51:50 (5 years ago)
- Files:
-
- 1 modified
-
lang/perl/HTTP-Engine/trunk/tools/profile2.pl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/HTTP-Engine/trunk/tools/profile2.pl
r17880 r17885 4 4 use HTTP::Engine; 5 5 use LWP::UserAgent; 6 7 my $module = shift || 'ServerSimple'; 8 print "module: $module\n"; 9 Class::MOP::load_class("HTTP::Engine::Interface::$module"); 6 10 7 11 test_tcp( … … 15 19 server => sub { 16 20 my $port = shift; 17 require Devel::NYTProf; 18 $ENV{NYTPROF} = 'start=no'; 19 Devel::NYTProf->import; 20 DB::enable_profile(); 21 $SIG{TERM} = sub { DB::_finish(); exit; }; 21 22 if (!$ENV{NO_NYTPROF}) { 23 require Devel::NYTProf; 24 $ENV{NYTPROF} = 'start=no'; 25 Devel::NYTProf->import; 26 DB::enable_profile(); 27 $SIG{TERM} = sub { DB::_finish(); exit; }; 28 } 29 22 30 HTTP::Engine->new( 23 31 interface => { 24 module => 'ServerSimple',32 module => $module, 25 33 args => { 26 34 port => $port, … … 32 40 }, 33 41 )->run; 42 if ($module eq 'POE') { 43 POE::Kernel->run(); 44 } 34 45 }, 35 46 );
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)