|
1 | 1 | import RecordedCalls |
2 | 2 |
|
3 | | -from string text, float number, float ratio |
| 3 | + |
| 4 | +from string text, float number, float ratio, int i |
4 | 5 | where |
5 | 6 | exists(int all_rcs | all_rcs = count(XMLRecordedCall rc) and ratio = number / all_rcs | |
6 | | - text = "Number of XMLRecordedCall" and number = all_rcs |
| 7 | + text = "XMLRecordedCall" and number = all_rcs and i = 0 |
7 | 8 | or |
8 | | - text = "Number of IdentifiedRecordedCall" and number = count(IdentifiedRecordedCall rc) |
| 9 | + text = "IgnoredRecordedCall" and number = count(IgnoredRecordedCall rc) and i = 1 |
| 10 | + ) |
| 11 | + or |
| 12 | + text = "----------" and |
| 13 | + number = 0 and |
| 14 | + ratio = 0 and |
| 15 | + i = 2 |
| 16 | + or |
| 17 | + exists(int all_not_ignored_rcs | |
| 18 | + all_not_ignored_rcs = count(XMLRecordedCall rc | not rc instanceof IgnoredRecordedCall) and |
| 19 | + ratio = number / all_not_ignored_rcs |
| 20 | + | |
| 21 | + text = "IdentifiedRecordedCall" and |
| 22 | + number = count(IdentifiedRecordedCall rc | not rc instanceof IgnoredRecordedCall) and |
| 23 | + i = 3 |
9 | 24 | or |
10 | | - text = "Number of UnidentifiedRecordedCall" and number = count(UnidentifiedRecordedCall rc) |
| 25 | + text = "UnidentifiedRecordedCall" and |
| 26 | + number = count(UnidentifiedRecordedCall rc | not rc instanceof IgnoredRecordedCall) and |
| 27 | + i = 4 |
11 | 28 | ) |
12 | 29 | or |
| 30 | + text = "----------" and |
| 31 | + number = 0 and |
| 32 | + ratio = 0 and |
| 33 | + i = 5 |
| 34 | + or |
13 | 35 | exists(int all_identified_rcs | |
14 | | - all_identified_rcs = count(IdentifiedRecordedCall rc) and ratio = number / all_identified_rcs |
| 36 | + all_identified_rcs = count(IdentifiedRecordedCall rc | not rc instanceof IgnoredRecordedCall) and |
| 37 | + ratio = number / all_identified_rcs |
15 | 38 | | |
16 | | - text = "Number of points-to ResolvableRecordedCall" and |
17 | | - number = count(PointsToBasedCallGraph::ResolvableRecordedCall rc) |
| 39 | + text = "points-to ResolvableRecordedCall" and |
| 40 | + number = |
| 41 | + count(PointsToBasedCallGraph::ResolvableRecordedCall rc | |
| 42 | + not rc instanceof IgnoredRecordedCall |
| 43 | + ) and |
| 44 | + i = 6 |
18 | 45 | or |
19 | | - text = "Number of points-to NOT ResolvableRecordedCall" and |
20 | | - number = all_identified_rcs - count(PointsToBasedCallGraph::ResolvableRecordedCall rc) |
| 46 | + text = "points-to not ResolvableRecordedCall" and |
| 47 | + number = |
| 48 | + all_identified_rcs - |
| 49 | + count(PointsToBasedCallGraph::ResolvableRecordedCall rc | |
| 50 | + not rc instanceof IgnoredRecordedCall |
| 51 | + ) and |
| 52 | + i = 7 |
21 | 53 | ) |
22 | | -select text, number, ratio * 100 + "%" as percent |
| 54 | +select i, text, number, ratio * 100 + "%" as percent order by i |
0 commit comments