Filename | /home/rjamet/Work/Code/sinalgo/runnerv3/Runner/Job.pm |
Statements | Executed 12 statements in 2.48ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 1.31ms | 1.31ms | CORE:open (opcode) | Runner::Job::
1 | 1 | 1 | 128µs | 1.46ms | getJobHandle | Runner::Job::
1 | 1 | 1 | 34µs | 73µs | BEGIN@3 | Runner::Job::
1 | 1 | 1 | 27µs | 27µs | CORE:subst (opcode) | Runner::Job::
1 | 1 | 1 | 23µs | 39µs | BEGIN@4 | Runner::Job::
1 | 1 | 1 | 12µs | 12µ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 | 119µs | 2 | 112µs | # spent 73µs (34+39) within Runner::Job::BEGIN@3 which was called:
# once (34µs+39µs) by Runner::BEGIN@17 at line 3 # spent 73µs making 1 call to Runner::Job::BEGIN@3
# spent 39µs making 1 call to strict::import |
4 | 2 | 66µs | 2 | 54µs | # spent 39µs (23+16) within Runner::Job::BEGIN@4 which was called:
# once (23µs+16µs) by Runner::BEGIN@17 at line 4 # spent 39µs making 1 call to Runner::Job::BEGIN@4
# spent 16µs making 1 call to warnings::import |
5 | 2 | 813µs | 1 | 12µs | # spent 12µs within Runner::Job::BEGIN@5 which was called:
# once (12µs+0s) by Runner::BEGIN@17 at line 5 # spent 12µ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.46ms (128µs+1.33) within Runner::Job::getJobHandle which was called:
# once (128µs+1.33ms) by main::RUNTIME at line 63 of runner.pl | ||||
31 | 1 | 2µs | my $command = shift; | ||
32 | 1 | 800ns | my $run = shift; | ||
33 | 1 | 39µs | 1 | 27µs | $command =~ s/\$RUN/$run/ig; # spent 27µs making 1 call to Runner::Job::CORE:subst |
34 | |||||
35 | 1 | 1.40ms | 1 | 1.31ms | open(my $JOBHANDLE, "$command |"); # spent 1.31ms making 1 call to Runner::Job::CORE:open |
36 | 1 | 35µ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 | 7µs | return 1; | ||
# spent 1.31ms within Runner::Job::CORE:open which was called:
# once (1.31ms+0s) by Runner::Job::getJobHandle at line 35 | |||||
# spent 27µs within Runner::Job::CORE:subst which was called:
# once (27µs+0s) by Runner::Job::getJobHandle at line 33 |