Filename | /Users/ap13/pathogens/Roary/lib/Bio/Roary/JobRunner/Role.pm |
Statements | Executed 9 statements in 176µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 34µs | 2.99ms | 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 | 151µs | 2 | 5.95ms | # spent 2.99ms (34µs+2.96) within Bio::Roary::JobRunner::Role::BEGIN@12 which was called:
# once (34µs+2.96ms) by Module::Runtime::require_module at line 12 # spent 2.99ms making 1 call to Bio::Roary::JobRunner::Role::BEGIN@12
# spent 2.96ms making 1 call to Moose::Role::import |
13 | |||||
14 | 1 | 2µs | 1 | 147µs | has 'job_runner' => ( is => 'rw', isa => 'Str', default => 'Local' ); # spent 147µs making 1 call to Moose::Role::has |
15 | 1 | 2µs | 1 | 91µs | has '_job_runner_class' => ( is => 'ro', isa => 'Str', lazy => 1, builder => '_build__job_runner_class' ); # spent 91µs making 1 call to Moose::Role::has |
16 | 1 | 1µs | 1 | 86µs | has '_memory_required_in_mb' => ( is => 'rw', isa => 'Int', default => '200' ); # spent 86µs making 1 call to Moose::Role::has |
17 | 1 | 1µs | 1 | 84µs | has '_queue' => ( is => 'rw', isa => 'Str', default => 'normal' ); # spent 84µs making 1 call to Moose::Role::has |
18 | 1 | 1µs | 1 | 84µs | has 'dont_wait' => ( is => 'rw', isa => 'Bool', default => 0 ); # spent 84µs making 1 call to Moose::Role::has |
19 | 1 | 1µs | 1 | 83µs | has 'cpus' => ( is => 'ro', isa => 'Int', default => 1 ); # spent 83µ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 | 17µs | 1; |