diff options
-rwxr-xr-x | bin/dfatool | 2 | ||||
-rw-r--r-- | lib/Kratos/DFADriver.pm | 8 | ||||
-rwxr-xr-x | lib/dfatool.py | 2 |
3 files changed, 11 insertions, 1 deletions
diff --git a/bin/dfatool b/bin/dfatool index 75449a3..4376730 100755 --- a/bin/dfatool +++ b/bin/dfatool @@ -22,6 +22,7 @@ GetOptions( plot=s no-cache no-update + note=s param-default=s@ state-duration=i shunt=f @@ -53,6 +54,7 @@ my $driver = Kratos::DFADriver->new( data_file => $data_files[0], excluded_states => $opt{'exclude-states'} // [], fast_analysis => $opt{'zomg-fasta-nao'} // 0, + filename_suffix => $opt{'note'}, ignore_nested => $opt{'ignore-nested-calls'} // 0, logging => $opt{logging} // 1, state_duration => $opt{'state-duration'} // 1000, diff --git a/lib/Kratos/DFADriver.pm b/lib/Kratos/DFADriver.pm index b59dec1..ea37956 100644 --- a/lib/Kratos/DFADriver.pm +++ b/lib/Kratos/DFADriver.pm @@ -1078,7 +1078,13 @@ sub archive_files { ) ); - $tar->write("../data/$self->{lp}{timestamp}_$self->{class_name}.tar"); + my $filename = "../data/$self->{lp}{timestamp}_$self->{class_name}"; + if ($self->{filename_suffix}) { + $filename .= '_' . $self->{filename_suffix}; + } + $filename .= '.tar'; + + $tar->write($filename); return $self; } diff --git a/lib/dfatool.py b/lib/dfatool.py index 3def392..66be4fd 100755 --- a/lib/dfatool.py +++ b/lib/dfatool.py @@ -15,6 +15,8 @@ def running_mean(x, N): return (cumsum[N:] - cumsum[:-N]) / N def is_numeric(n): + if n == None: + return False try: int(n) return True |