Update faults filtering to be selectable from menu
This commit is contained in:
@ -4,10 +4,19 @@ use strict;
|
||||
use warnings;
|
||||
use diagnostics;
|
||||
|
||||
use FindBin;
|
||||
use lib "$FindBin::Bin/..";
|
||||
use lib "$FindBin::Bin/../Modules";
|
||||
use Modules::Filters;
|
||||
|
||||
use feature 'say';
|
||||
|
||||
sub query {
|
||||
my ($experiment) = @_;
|
||||
my ( $experiment, $experiment_dir, $filter_config_name ) = @_;
|
||||
$filter_config_name //= '';
|
||||
|
||||
my $extra = Modules::Filters::build_filter_clause( $experiment_dir,
|
||||
$filter_config_name );
|
||||
|
||||
my $querystring = "SELECT
|
||||
benchmark, resulttype, sum(t.time2 - t.time1 + 1) AS faults
|
||||
@ -16,7 +25,7 @@ JOIN trace t ON v.id = t.variant_id
|
||||
JOIN fspgroup g ON g.variant_id = t.variant_id AND g.instr2 = t.instr2 AND g.data_physical_address = t.data_physical_address
|
||||
JOIN result_GenericExperimentMessage r ON r.pilot_id = g.pilot_id
|
||||
JOIN fsppilot p ON r.pilot_id = p.id
|
||||
WHERE v.variant = '$experiment'
|
||||
WHERE v.variant = '$experiment'$extra
|
||||
GROUP BY v.id, resulttype
|
||||
ORDER BY variant, benchmark, resulttype;";
|
||||
|
||||
@ -27,7 +36,12 @@ ORDER BY variant, benchmark, resulttype;";
|
||||
|
||||
sub args { return "--batch --raw"; }
|
||||
|
||||
sub filename { return "resultsdata.csv"; }
|
||||
sub filename {
|
||||
my ($filter_config_name) = @_;
|
||||
$filter_config_name //= '';
|
||||
my $suffix = length($filter_config_name) ? "_filtered_$filter_config_name" : "";
|
||||
return "resultsdata${suffix}.csv";
|
||||
}
|
||||
|
||||
sub postprocess { $_[0] =~ s/\t/,/g; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user