Files
fail/tools/analysis/data-aggregator/translation-unit-occurrences.sh
Horst Schirmeier f5b34a962c data-aggregator: fix alphabetic resulttype sorting
Depending on SQL-statement nesting, some scripts already correctly sorted
resulttypes alphabetically, but some sorted along the numeric ENUM value
behind the resulttype name.  This change explicitly converts the resulttype
to a string before sorting.

Change-Id: Ia18aa4e75b94a6a9f7bb125953bc85b86b3cbd6e
2018-07-24 09:16:33 +02:00

28 lines
813 B
Bash
Executable File

#!/bin/bash
source $(dirname $0)/fail-analysis-common.inc.sh
$MYSQL << EOT
SELECT v.benchmark, v.variant, f.path, r.resulttype, SUM(t.time2-t.time1+1) AS occurrences
FROM variant v
JOIN dbg_filename f
ON f.variant_id = v.id
JOIN dbg_mapping m
ON f.variant_id = m.variant_id
AND f.file_id = m.file_id
JOIN trace t
ON t.variant_id = m.variant_id
AND t.instr2_absolute BETWEEN m.instr_absolute AND m.instr_absolute + m.line_range_size - 1
JOIN fspgroup g
ON g.variant_id = t.variant_id
AND g.data_address = t.data_address
AND g.instr2 = t.instr2
AND g.fspmethod_id = (SELECT id FROM fspmethod WHERE method = 'basic')
JOIN result_GenericExperimentMessage r
ON r.pilot_id = g.pilot_id
WHERE $FILTER
GROUP BY v.id, f.file_id, r.resulttype
ORDER BY v.benchmark, v.variant, f.path, CONCAT(r.resulttype)
;
EOT