Filename | /Users/ap13/pathogens/Roary/lib/Bio/Roary/JobRunner/Role.pm |
Statements | Executed 9 statements in 195µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 38µs | 3.29ms | BEGIN@12 | Bio::Roary::JobRunner::Role::
0 | 0 | 0 | 0s | 0s | _build__job_runner_class | Bio::Roary::JobRunner::Role::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package Bio::Roary::JobRunner::Role; | ||||
2 | |||||
3 | # ABSTRACT: A role to add job runner functionality | ||||
4 | |||||
5 | =head1 SYNOPSIS | ||||
6 | |||||
7 | A role to add job runner functionality | ||||
8 | with 'Bio::Roary::JobRunner::Role'; | ||||
9 | |||||
10 | =cut | ||||
11 | |||||
12 | 2 | 169µs | 2 | 6.55ms | # spent 3.29ms (38µs+3.26) within Bio::Roary::JobRunner::Role::BEGIN@12 which was called:
# once (38µs+3.26ms) by Module::Runtime::require_module at line 12 # spent 3.29ms making 1 call to Bio::Roary::JobRunner::Role::BEGIN@12
# spent 3.26ms making 1 call to Moose::Role::import |
13 | |||||
14 | 1 | 2µs | 1 | 169µs | has 'job_runner' => ( is => 'rw', isa => 'Str', default => 'Local' ); # spent 169µs making 1 call to Moose::Role::has |
15 | 1 | 2µs | 1 | 111µs | has '_job_runner_class' => ( is => 'ro', isa => 'Str', lazy => 1, builder => '_build__job_runner_class' ); # spent 111µs making 1 call to Moose::Role::has |
16 | 1 | 1µs | 1 | 87µs | has '_memory_required_in_mb' => ( is => 'rw', isa => 'Int', default => '200' ); # spent 87µs making 1 call to Moose::Role::has |
17 | 1 | 1µs | 1 | 85µs | has '_queue' => ( is => 'rw', isa => 'Str', default => 'normal' ); # spent 85µs making 1 call to Moose::Role::has |
18 | 1 | 1µs | 1 | 83µs | has 'dont_wait' => ( is => 'rw', isa => 'Bool', default => 0 ); # spent 83µs making 1 call to Moose::Role::has |
19 | 1 | 1µs | 1 | 82µs | has 'cpus' => ( is => 'ro', isa => 'Int', default => 1 ); # spent 82µs making 1 call to Moose::Role::has |
20 | |||||
21 | sub _build__job_runner_class { | ||||
22 | my ($self) = @_; | ||||
23 | my $job_runner_class = "Bio::Roary::JobRunner::" . $self->job_runner; | ||||
24 | eval "require $job_runner_class"; | ||||
25 | return $job_runner_class; | ||||
26 | } | ||||
27 | |||||
28 | |||||
29 | 1 | 18µs | 1; |