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