← Index
NYTProf Performance Profile   « block view • line view • sub view »
For xt/tapper-mcp-scheduler-with-db-longrun.t
  Run on Tue May 22 17:18:39 2012
Reported on Tue May 22 17:22:38 2012

Filename/2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/Tapper/Producer/Temare.pm
StatementsExecuted 22 statements in 710µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1114.73ms16.1msTapper::Producer::Temare::::BEGIN@12Tapper::Producer::Temare::BEGIN@12
11116µs80µsTapper::Producer::Temare::::BEGIN@13Tapper::Producer::Temare::BEGIN@13
11112µs4.54msTapper::Producer::Temare::::BEGIN@11Tapper::Producer::Temare::BEGIN@11
11110µs10µsTapper::Producer::Temare::::BEGIN@3Tapper::Producer::Temare::BEGIN@3
11110µs34µsTapper::Producer::Temare::::BEGIN@23Tapper::Producer::Temare::BEGIN@23
11110µs46µsTapper::Producer::Temare::::BEGIN@15Tapper::Producer::Temare::BEGIN@15
1117µs7µsTapper::Producer::Temare::::BEGIN@14Tapper::Producer::Temare::BEGIN@14
0000s0sTapper::Producer::Temare::::__ANON__[:40]Tapper::Producer::Temare::__ANON__[:40]
0000s0sTapper::Producer::Temare::::produceTapper::Producer::Temare::produce
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1## no critic (RequireUseStrict)
2package Tapper::Producer::Temare;
3
# spent 10µs within Tapper::Producer::Temare::BEGIN@3 which was called: # once (10µs+0s) by main::BEGIN@19 at line 5
BEGIN {
415µs $Tapper::Producer::Temare::AUTHORITY = 'cpan:AMD';
5126µs110µs}
# spent 10µs making 1 call to Tapper::Producer::Temare::BEGIN@3
6{
722µs $Tapper::Producer::Temare::VERSION = '4.001.001';
8}
9# ABSTRACT: produce preconditions via temare
10
11366µs29.07ms
# spent 4.54ms (12µs+4.53) within Tapper::Producer::Temare::BEGIN@11 which was called: # once (12µs+4.53ms) by main::BEGIN@19 at line 11
use Moose;
# spent 4.54ms making 1 call to Tapper::Producer::Temare::BEGIN@11 # spent 4.53ms making 1 call to Moose::Exporter::__ANON__[Moose/Exporter.pm:492]
123229µs223.8ms
# spent 16.1ms (4.73+11.4) within Tapper::Producer::Temare::BEGIN@12 which was called: # once (4.73ms+11.4ms) by main::BEGIN@19 at line 12
use File::Temp 'tempfile';
# spent 16.1ms making 1 call to Tapper::Producer::Temare::BEGIN@12 # spent 7.61ms making 1 call to Exporter::import
13326µs2144µs
# spent 80µs (16+64) within Tapper::Producer::Temare::BEGIN@13 which was called: # once (16µs+64µs) by main::BEGIN@19 at line 13
use YAML 'LoadFile';
# spent 80µs making 1 call to Tapper::Producer::Temare::BEGIN@13 # spent 64µs making 1 call to Exporter::import
14322µs17µs
# spent 7µs within Tapper::Producer::Temare::BEGIN@14 which was called: # once (7µs+0s) by main::BEGIN@19 at line 14
use Tapper::Config;
# spent 7µs making 1 call to Tapper::Producer::Temare::BEGIN@14
15359µs282µs
# spent 46µs (10+36) within Tapper::Producer::Temare::BEGIN@15 which was called: # once (10µs+36µs) by main::BEGIN@19 at line 15
use Try::Tiny;
# spent 46µs making 1 call to Tapper::Producer::Temare::BEGIN@15 # spent 36µs making 1 call to Exporter::import
16
17
18 sub produce {
19 my ($self, $job, $produce) = @_;
20
21 my ($fh, $file) = tempfile( UNLINK => 1 );
22
233271µs257µs
# spent 34µs (10+23) within Tapper::Producer::Temare::BEGIN@23 which was called: # once (10µs+23µs) by main::BEGIN@19 at line 23
use Data::Dumper;
# spent 34µs making 1 call to Tapper::Producer::Temare::BEGIN@23 # spent 23µs making 1 call to Exporter::import
24 my $temare_path=Tapper::Config->subconfig->{paths}{temare_path};
25
26 $ENV{PYTHONPATH}="$temare_path/src";
27 my $subject = $produce->{subject};
28 my $bitness = $produce->{bitness};
29 my $host = $job->host->name;
30 $ENV{TAPPER_TEMARE} = $file;
31 my $cmd="$temare_path/temare subjectprep $host $subject $bitness";
32 my $precondition = qx($cmd);
33 if ($?) {
34 my $error_msg = "Temare error.\n";
35 $error_msg .= "Error code: $?\n";
36 $error_msg .= "Error message: $precondition\n";
37 die $error_msg;
38 }
39
40 my $config = try {LoadFile($file)} catch { die "Error occured while loading precondition $precondition:\n$_"};
41 close $fh;
42 unlink $file if -e $file;
43 my $topic = $config->{subject} || 'Misc';
44 return {
45 topic => $topic,
46 precondition_yaml => $precondition
47 };
48 }
49
5015µs1;
51
52__END__