summaryrefslogtreecommitdiff
path: root/lib/Kratos/DFADriver.pm
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2017-04-06 16:42:48 +0200
committerDaniel Friesel <derf@finalrewind.org>2017-04-06 16:42:48 +0200
commit83549eb94e055d02002bf6c46a25d0ad0aed24c7 (patch)
tree00e3ffc19210199b78a1bb069f8114b7a2132b2f /lib/Kratos/DFADriver.pm
parentc4a4ca14987b2a9e4857b4d85a4437dd10e4bf5c (diff)
refactoring, no more special treatment for timeout (mostly)
Diffstat (limited to 'lib/Kratos/DFADriver.pm')
-rw-r--r--lib/Kratos/DFADriver.pm18
1 files changed, 10 insertions, 8 deletions
diff --git a/lib/Kratos/DFADriver.pm b/lib/Kratos/DFADriver.pm
index b393415..48ebdab 100644
--- a/lib/Kratos/DFADriver.pm
+++ b/lib/Kratos/DFADriver.pm
@@ -680,14 +680,16 @@ sub update_model {
}
for my $name (sort keys %{ $self->{log}{aggregate}{transition} }) {
my $transition = $self->{log}{aggregate}{transition}{$name};
- $self->model->set_transition_data(
- $name,
- $transition->{duration}{median},
- $transition->{energy}{median},
- $transition->{rel_energy_prev}{median},
- $transition->{rel_energy_next}{median}
- );
- for my $key (qw(duration energy rel_energy_prev rel_energy_next timeout)) {
+ my @keys = (qw(duration energy rel_energy_prev rel_energy_next));
+
+ if ($self->model->get_transition_by_name($name)->{level} eq 'epilogue') {
+ push(@keys, 'timeout');
+ }
+
+ for my $key (@keys) {
+ $self->model->set_transition_property(
+ $name, $key, $transition->{$key}{median}
+ );
for my $fname ( keys %{ $transition->{$key}{function} } ) {
$self->model->set_transition_params(
$name, $key, $fname,