Python: CG trace: Metrics, number of recorded calls not ignored

turned out to be useful after all :P
This commit is contained in:
Rasmus Wriedt Larsen
2020-07-24 16:49:54 +02:00
parent 367a49803b
commit a7bc9544b6

View File

@@ -1,17 +1,20 @@
import RecordedCalls import RecordedCalls
// colum i is just used for sorting
from string text, float number, float ratio, int i from string text, float number, float ratio, int i
where where
exists(int all_rcs | all_rcs = count(XMLRecordedCall rc) and ratio = number / all_rcs | exists(int all_rcs | all_rcs = count(XMLRecordedCall rc) and ratio = number / all_rcs |
text = "XMLRecordedCall" and number = all_rcs and i = 0 text = "XMLRecordedCall" and number = all_rcs and i = 0
or or
text = "IgnoredRecordedCall" and number = count(IgnoredRecordedCall rc) and i = 1 text = "IgnoredRecordedCall" and number = count(IgnoredRecordedCall rc) and i = 1
or
text = "not IgnoredRecordedCall" and number = all_rcs - count(IgnoredRecordedCall rc) and i = 2
) )
or or
text = "----------" and text = "----------" and
number = 0 and number = 0 and
ratio = 0 and ratio = 0 and
i = 2 i = 10
or or
exists(int all_not_ignored_rcs | exists(int all_not_ignored_rcs |
all_not_ignored_rcs = count(XMLRecordedCall rc | not rc instanceof IgnoredRecordedCall) and all_not_ignored_rcs = count(XMLRecordedCall rc | not rc instanceof IgnoredRecordedCall) and
@@ -19,17 +22,17 @@ where
| |
text = "IdentifiedRecordedCall" and text = "IdentifiedRecordedCall" and
number = count(IdentifiedRecordedCall rc | not rc instanceof IgnoredRecordedCall) and number = count(IdentifiedRecordedCall rc | not rc instanceof IgnoredRecordedCall) and
i = 3 i = 11
or or
text = "UnidentifiedRecordedCall" and text = "UnidentifiedRecordedCall" and
number = count(UnidentifiedRecordedCall rc | not rc instanceof IgnoredRecordedCall) and number = count(UnidentifiedRecordedCall rc | not rc instanceof IgnoredRecordedCall) and
i = 4 i = 12
) )
or or
text = "----------" and text = "----------" and
number = 0 and number = 0 and
ratio = 0 and ratio = 0 and
i = 5 i = 20
or or
exists(int all_identified_rcs | exists(int all_identified_rcs |
all_identified_rcs = count(IdentifiedRecordedCall rc | not rc instanceof IgnoredRecordedCall) and all_identified_rcs = count(IdentifiedRecordedCall rc | not rc instanceof IgnoredRecordedCall) and
@@ -40,7 +43,7 @@ where
count(PointsToBasedCallGraph::ResolvableRecordedCall rc | count(PointsToBasedCallGraph::ResolvableRecordedCall rc |
not rc instanceof IgnoredRecordedCall not rc instanceof IgnoredRecordedCall
) and ) and
i = 6 i = 21
or or
text = "points-to not ResolvableRecordedCall" and text = "points-to not ResolvableRecordedCall" and
number = number =
@@ -48,6 +51,6 @@ where
count(PointsToBasedCallGraph::ResolvableRecordedCall rc | count(PointsToBasedCallGraph::ResolvableRecordedCall rc |
not rc instanceof IgnoredRecordedCall not rc instanceof IgnoredRecordedCall
) and ) and
i = 7 i = 22
) )
select i, text, number, ratio * 100 + "%" as percent order by i select i, text, number, ratio * 100 + "%" as percent order by i