add curses entry point for scripts (archival, ghidra import, plots, queries, cleanup)

This commit is contained in:
2026-04-20 00:16:27 +02:00
parent 9c7933e912
commit 5b316bbd64
16 changed files with 622 additions and 349 deletions

29
scripts/Queries/Faults.pm Normal file
View File

@ -0,0 +1,29 @@
package Queries::Faults;
use strict;
use warnings;
use diagnostics;
sub query {
my ($experiment) = @_;
return "SELECT
benchmark, resulttype, SUM(t.time2 - t.time1 + 1) AS faults,
CONCAT('0x', HEX(p.injection_instr_absolute)) AS fault_address
FROM variant v
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_address = t.data_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'
GROUP BY benchmark, resulttype, p.injection_instr_absolute
ORDER BY benchmark, resulttype, SUM(t.time2 - t.time1 + 1) DESC;"
}
sub args { return "--batch --raw"; }
sub filename { return "faults.csv"; }
sub postprocess { $_[0] =~ s/\t/,/g; }
1;