Skip to content

Commit

Permalink
Rust: Improve layout locality in summary stats.
Browse files Browse the repository at this point in the history
  • Loading branch information
geoffw0 committed Sep 17, 2024
1 parent 07fccf8 commit 83376af
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions rust/ql/src/queries/summary/SummaryStats.ql
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ import Stats

from string key, string value
where
key = "Extracted files" and value = count(File f | exists(f.getRelativePath())).toString()
key = "Files extracted" and value = count(File f | exists(f.getRelativePath())).toString()
or
key = "Extracted elements" and value = count(Element e | not e instanceof Unextracted).toString()
key = "Elements extracted" and value = count(Element e | not e instanceof Unextracted).toString()
or
key = "Unextracted elements" and value = count(Unextracted e).toString()
key = "Elements unextracted" and value = count(Unextracted e).toString()
or
key = "Lines of code" and value = getLinesOfCode().toString()
key = "Lines of code extracted" and value = getLinesOfCode().toString()
or
key = "Lines of user code" and value = getLinesOfUserCode().toString()
key = "Lines of user code extracted" and value = getLinesOfUserCode().toString()
select key, value
10 changes: 5 additions & 5 deletions rust/ql/test/query-tests/diagnostics/SummaryStats.expected
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
| Extracted elements | 61 |
| Extracted files | 6 |
| Lines of code | 24 |
| Lines of user code | 24 |
| Unextracted elements | 26 |
| Elements extracted | 61 |
| Elements unextracted | 26 |
| Files extracted | 6 |
| Lines of code extracted | 24 |
| Lines of user code extracted | 24 |

0 comments on commit 83376af

Please sign in to comment.