diff --git a/rust/ql/integration-tests/hello-workspace/summary.cargo.expected b/rust/ql/integration-tests/hello-workspace/summary.cargo.expected index 11fba34f9019..85d2b9971712 100644 --- a/rust/ql/integration-tests/hello-workspace/summary.cargo.expected +++ b/rust/ql/integration-tests/hello-workspace/summary.cargo.expected @@ -1,6 +1,6 @@ | Extraction errors | 0 | | Extraction warnings | 0 | -| Files extracted - total | 4 | +| Files extracted - total user | 4 | | Files extracted - with errors | 0 | | Files extracted - without errors | 4 | | Files extracted - without errors % | 100 | diff --git a/rust/ql/integration-tests/hello-workspace/summary.rust-project.expected b/rust/ql/integration-tests/hello-workspace/summary.rust-project.expected index 11fba34f9019..85d2b9971712 100644 --- a/rust/ql/integration-tests/hello-workspace/summary.rust-project.expected +++ b/rust/ql/integration-tests/hello-workspace/summary.rust-project.expected @@ -1,6 +1,6 @@ | Extraction errors | 0 | | Extraction warnings | 0 | -| Files extracted - total | 4 | +| Files extracted - total user | 4 | | Files extracted - with errors | 0 | | Files extracted - without errors | 4 | | Files extracted - without errors % | 100 | diff --git a/rust/ql/src/queries/summary/Stats.qll b/rust/ql/src/queries/summary/Stats.qll index 36eeb0df4ef4..a9c040e4b3c7 100644 --- a/rust/ql/src/queries/summary/Stats.qll +++ b/rust/ql/src/queries/summary/Stats.qll @@ -131,7 +131,8 @@ predicate extractionStats(string key, int value) { key = "Extraction warnings" and value = count(ExtractionWarning w | not exists(w.getLocation()) or w.getLocation().fromSource()) or - key = "Files extracted - total" and value = count(ExtractedFile f | exists(f.getRelativePath())) + key = "Files extracted - total user" and + value = count(ExtractedFile f | exists(f.getRelativePath())) or key = "Files extracted - with errors" and value = @@ -160,6 +161,13 @@ predicate extractionStats(string key, int value) { value = count(MacroCall mc | mc.fromSource() and not mc.hasMacroCallExpansion()) } +/** + * Gets further summary statistics about extraction. + */ +predicate extractionStatsExtra(string key, int value) { + key = "Files extracted - total" and value = count(File f) +} + /** * Gets summary statistics about inconsistencies. */ diff --git a/rust/ql/src/queries/summary/SummaryStats.ql b/rust/ql/src/queries/summary/SummaryStats.ql index 47a2c91a9eda..adfd302d0f8b 100644 --- a/rust/ql/src/queries/summary/SummaryStats.ql +++ b/rust/ql/src/queries/summary/SummaryStats.ql @@ -15,6 +15,8 @@ where or extractionStats(key, value) or + extractionStatsExtra(key, value) + or inconsistencyStats(key, value) or typeInferenceInconsistencyStats(key, value) diff --git a/rust/ql/test/query-tests/diagnostics/SummaryStatsReduced.expected b/rust/ql/test/query-tests/diagnostics/SummaryStatsReduced.expected index ed21d9772fce..7756215d1023 100644 --- a/rust/ql/test/query-tests/diagnostics/SummaryStatsReduced.expected +++ b/rust/ql/test/query-tests/diagnostics/SummaryStatsReduced.expected @@ -1,6 +1,6 @@ | Extraction errors | 0 | | Extraction warnings | 7 | -| Files extracted - total | 7 | +| Files extracted - total user | 7 | | Files extracted - with errors | 3 | | Files extracted - without errors | 4 | | Files extracted - without errors % | 57 |