← Index
NYTProf Performance Profile   « line view »
For runner.pl
  Run on Mon Jun 30 17:28:08 2014
Reported on Mon Jun 30 17:28:40 2014

Filename/home/rjamet/Work/Code/sinalgo/runnerv3/Runner/Job.pm
StatementsExecuted 12 statements in 1.73ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
111993µs993µsRunner::Job::::CORE:openRunner::Job::CORE:open (opcode)
11197µs1.10msRunner::Job::::getJobHandleRunner::Job::getJobHandle
11122µs48µsRunner::Job::::BEGIN@3Runner::Job::BEGIN@3
11114µs14µsRunner::Job::::CORE:substRunner::Job::CORE:subst (opcode)
11113µs21µsRunner::Job::::BEGIN@4Runner::Job::BEGIN@4
1117µs7µsRunner::Job::::BEGIN@5Runner::Job::BEGIN@5
0000s0sRunner::Job::::packJobRunner::Job::packJob
0000s0sRunner::Job::::runJob_Runner::Job::runJob_
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Runner::Job;
2
3246µs274µs
# spent 48µs (22+26) within Runner::Job::BEGIN@3 which was called: # once (22µs+26µs) by Runner::BEGIN@17 at line 3
use strict;
# spent 48µs making 1 call to Runner::Job::BEGIN@3 # spent 26µs making 1 call to strict::import
4240µs230µs
# spent 21µs (13+8) within Runner::Job::BEGIN@4 which was called: # once (13µs+8µs) by Runner::BEGIN@17 at line 4
use warnings;
# spent 21µs making 1 call to Runner::Job::BEGIN@4 # spent 8µs making 1 call to warnings::import
52525µs17µs
# spent 7µs within Runner::Job::BEGIN@5 which was called: # once (7µs+0s) by Runner::BEGIN@17 at line 5
use Runner::IO;
# spent 7µs making 1 call to Runner::Job::BEGIN@5
6#use File::Map qw(map_file advise unmap) ;
7#use Sys::Mmap;
8
- -
11sub runJob_ {
12 my $command = shift;
13 my $run = shift;
14 $command =~ s/\$RUN/$run/ig;
15
16 my $jdata = `$command`;
17 my $switch = 0;
18
19 $jdata =~ s/^(.|\n)+Starting the Simulation\.//;
20 if ($jdata =~ m/(There was an Except(.|\n)+)/) {
21 print $1;
22 die("Sinalgo dumped an exception when running :\n$command");
23 }
24
25 return \$jdata;
26}
27
- -
30
# spent 1.10ms (97µs+1.01) within Runner::Job::getJobHandle which was called: # once (97µs+1.01ms) by main::RUNTIME at line 63 of runner.pl
sub getJobHandle {
3112µs my $command = shift;
321900ns my $run = shift;
33128µs114µs $command =~ s/\$RUN/$run/ig;
# spent 14µs making 1 call to Runner::Job::CORE:subst
34
3511.06ms1993µs open(my $JOBHANDLE, "$command |");
# spent 993µs making 1 call to Runner::Job::CORE:open
36121µs return $JOBHANDLE;
37}
38
- -
45#Packjob was supposed to be used to send work to remote machines, not used nor working
46sub packJob {
47 warn("packJob is not ready to be used");
48
49 my $destination = shift;
50 my $files = "../sinalgo ../runnerv3 ../binaries ../src ../build.xml";
51
52 my $command = "ssh rjamet\@".$destination." mkdir /tmp/sinalgo";
53 `$command`;
54
55 $command = "scp -r $files rjamet\@".$destination.":/tmp/sinalgo";
56 print `$command`;
57 if ($? != 0) {
58 croak("Problem with the sender");
59 }
60
61 #scp sinalgo src runnerv3 build.xml binaries DESTINATION
62 #ant clean compile
63}
64
65
6614µsreturn 1;
 
# spent 993µs within Runner::Job::CORE:open which was called: # once (993µs+0s) by Runner::Job::getJobHandle at line 35
sub Runner::Job::CORE:open; # opcode
# spent 14µs within Runner::Job::CORE:subst which was called: # once (14µs+0s) by Runner::Job::getJobHandle at line 33
sub Runner::Job::CORE:subst; # opcode