Filename | /home/rjamet/Work/Code/sinalgo/runnerv3/Runner/Job.pm |
Statements | Executed 12 statements in 1.73ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 993µs | 993µs | CORE:open (opcode) | Runner::Job::
1 | 1 | 1 | 97µs | 1.10ms | getJobHandle | Runner::Job::
1 | 1 | 1 | 22µs | 48µs | BEGIN@3 | Runner::Job::
1 | 1 | 1 | 14µs | 14µs | CORE:subst (opcode) | Runner::Job::
1 | 1 | 1 | 13µs | 21µs | BEGIN@4 | Runner::Job::
1 | 1 | 1 | 7µs | 7µs | BEGIN@5 | Runner::Job::
0 | 0 | 0 | 0s | 0s | packJob | Runner::Job::
0 | 0 | 0 | 0s | 0s | runJob_ | Runner::Job::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package Runner::Job; | ||||
2 | |||||
3 | 2 | 46µs | 2 | 74µ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 # spent 48µs making 1 call to Runner::Job::BEGIN@3
# spent 26µs making 1 call to strict::import |
4 | 2 | 40µs | 2 | 30µ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 # spent 21µs making 1 call to Runner::Job::BEGIN@4
# spent 8µs making 1 call to warnings::import |
5 | 2 | 525µs | 1 | 7µs | # spent 7µs within Runner::Job::BEGIN@5 which was called:
# once (7µs+0s) by Runner::BEGIN@17 at line 5 # 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 | |||||
- - | |||||
11 | sub 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 | ||||
31 | 1 | 2µs | my $command = shift; | ||
32 | 1 | 900ns | my $run = shift; | ||
33 | 1 | 28µs | 1 | 14µs | $command =~ s/\$RUN/$run/ig; # spent 14µs making 1 call to Runner::Job::CORE:subst |
34 | |||||
35 | 1 | 1.06ms | 1 | 993µs | open(my $JOBHANDLE, "$command |"); # spent 993µs making 1 call to Runner::Job::CORE:open |
36 | 1 | 21µs | return $JOBHANDLE; | ||
37 | } | ||||
38 | |||||
- - | |||||
45 | #Packjob was supposed to be used to send work to remote machines, not used nor working | ||||
46 | sub 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 | |||||
66 | 1 | 4µs | return 1; | ||
# spent 993µs within Runner::Job::CORE:open which was called:
# once (993µs+0s) by Runner::Job::getJobHandle at line 35 | |||||
# spent 14µs within Runner::Job::CORE:subst which was called:
# once (14µs+0s) by Runner::Job::getJobHandle at line 33 |