11/**
22 * @name Summary Statistics
33 * @description A table of summary statistics about a database.
4- * @kind table
4+ * @kind metric
55 * @id rust/summary/summary-statistics
66 * @tags summary
77 */
@@ -10,29 +10,29 @@ import rust
1010import codeql.rust.Diagnostics
1111import Stats
1212
13- from string key , string value
13+ from string key , int value
1414where
15- key = "Elements extracted" and value = count ( Element e | not e instanceof Unextracted ) . toString ( )
15+ key = "Elements extracted" and value = count ( Element e | not e instanceof Unextracted )
1616 or
17- key = "Elements unextracted" and value = count ( Unextracted e ) . toString ( )
17+ key = "Elements unextracted" and value = count ( Unextracted e )
1818 or
19- key = "Extraction errors" and value = count ( ExtractionError e ) . toString ( )
19+ key = "Extraction errors" and value = count ( ExtractionError e )
2020 or
21- key = "Extraction warnings" and value = count ( ExtractionWarning w ) . toString ( )
21+ key = "Extraction warnings" and value = count ( ExtractionWarning w )
2222 or
23- key = "Files extracted - total" and value = count ( File f | exists ( f .getRelativePath ( ) ) ) . toString ( )
23+ key = "Files extracted - total" and value = count ( File f | exists ( f .getRelativePath ( ) ) )
2424 or
2525 key = "Files extracted - with errors" and
26- value =
27- count ( File f | exists ( f .getRelativePath ( ) ) and not f instanceof SuccessfullyExtractedFile )
28- .toString ( )
26+ value = count ( File f | exists ( f .getRelativePath ( ) ) and not f instanceof SuccessfullyExtractedFile )
2927 or
3028 key = "Files extracted - without errors" and
31- value = count ( SuccessfullyExtractedFile f | exists ( f .getRelativePath ( ) ) ) . toString ( )
29+ value = count ( SuccessfullyExtractedFile f | exists ( f .getRelativePath ( ) ) )
3230 or
33- key = "Lines of code extracted" and value = getLinesOfCode ( ) . toString ( )
31+ key = "Lines of code extracted" and value = getLinesOfCode ( )
3432 or
35- key = "Lines of user code extracted" and value = getLinesOfUserCode ( ) . toString ( )
33+ key = "Lines of user code extracted" and value = getLinesOfUserCode ( )
3634 or
37- key = "Inconsistencies - CFG" and value = getTotalCfgInconsistencies ( ) .toString ( )
35+ key = "Inconsistencies - AST" and value = getTotalAstInconsistencies ( )
36+ or
37+ key = "Inconsistencies - CFG" and value = getTotalCfgInconsistencies ( )
3838select key , value
0 commit comments