Skip to content

Commit 7775f49

Browse files
committed
Add "after" files for query evaluation integration tests
1 parent 192c6b8 commit 7775f49

File tree

4 files changed

+469
-2
lines changed

4 files changed

+469
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# CodeQL Evaluator Profile — Predicate Detail
2+
# Generated: 2026-03-10T13:53:19.904Z
3+
# Log format: raw
4+
# CodeQL version: 2.23.1
5+
# Use read_file with line ranges from the JSON response to access individual predicates.
6+
7+
== Query: QueryA.ql ==
8+
Total: 200.00ms | Predicates evaluated: 2 | Cache hits: 1
9+
10+
--- QueryA::source/0#abc123 ---
11+
Eval order: 1 of 2
12+
Duration: 65.00 ms
13+
Result: 5 tuples
14+
Strategy: SIMPLE_INTENSIONAL
15+
Position: /workspace/QueryA.ql:10,1-12,5
16+
Pipeline stages (1):
17+
[1] 50.00ms -> 5 tuples (counts=[5])
18+
19+
--- QueryA::sink/0#def456 ---
20+
Eval order: 2 of 2
21+
Duration: 45.00 ms
22+
Result: 3 tuples
23+
Strategy: SIMPLE_INTENSIONAL
24+
Position: /workspace/QueryA.ql:14,1-16,5
25+
Dependencies (1):
26+
- QueryA::source/0#abc123
27+
Pipeline stages (1):
28+
[1] 30.00ms -> 3 tuples (counts=[3])
29+
30+
== Query: QueryB.ql ==
31+
Total: 300.00ms | Predicates evaluated: 3 | Cache hits: 0
32+
33+
--- QueryB::entryPoint/0#jkl012 ---
34+
Eval order: 1 of 3
35+
Duration: 95.00 ms
36+
Result: 8 tuples
37+
Strategy: EXTENSIONAL
38+
Position: /workspace/QueryB.ql:8,1-10,3
39+
Pipeline stages (1):
40+
[1] 80.00ms -> 8 tuples (counts=[8])
41+
42+
--- QueryB::flowStep/2#mno345 ---
43+
Eval order: 2 of 3
44+
Duration: 95.00 ms
45+
Result: 12 tuples
46+
Strategy: SIMPLE_INTENSIONAL
47+
Position: /workspace/QueryB.ql:12,1-18,5
48+
Dependencies (1):
49+
- QueryB::entryPoint/0#jkl012
50+
Pipeline stages (1):
51+
[1] 80.00ms -> 12 tuples (counts=[12])
52+
53+
--- QueryB::result/3#pqr678 ---
54+
Eval order: 3 of 3
55+
Duration: 45.00 ms
56+
Result: 2 tuples
57+
Strategy: SIMPLE_INTENSIONAL
58+
Position: /workspace/QueryB.ql:20,1-22,5
59+
Dependencies (2):
60+
- QueryB::flowStep/2#mno345
61+
- QueryB::entryPoint/0#jkl012
62+
Pipeline stages (1):
63+
[1] 30.00ms -> 2 tuples (counts=[2])

client/integration-tests/primitives/tools/profile_codeql_query_from_logs/multi_query_raw_log/after/query-evaluation-profile.json

Lines changed: 62 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,19 @@
1414
"resultSize": 5,
1515
"pipelineCount": 1,
1616
"evaluationStrategy": "SIMPLE_INTENSIONAL",
17-
"dependencies": []
17+
"dependencies": [],
18+
"pipelineStages": [
19+
{
20+
"durationMs": 50,
21+
"resultSize": 5,
22+
"counts": [
23+
5
24+
],
25+
"duplicationPercentages": [
26+
0
27+
]
28+
}
29+
]
1830
},
1931
{
2032
"predicateName": "QueryA::sink/0#def456",
@@ -25,6 +37,18 @@
2537
"evaluationStrategy": "SIMPLE_INTENSIONAL",
2638
"dependencies": [
2739
"QueryA::source/0#abc123"
40+
],
41+
"pipelineStages": [
42+
{
43+
"durationMs": 30,
44+
"resultSize": 3,
45+
"counts": [
46+
3
47+
],
48+
"duplicationPercentages": [
49+
0
50+
]
51+
}
2852
]
2953
}
3054
],
@@ -42,7 +66,19 @@
4266
"resultSize": 8,
4367
"pipelineCount": 1,
4468
"evaluationStrategy": "EXTENSIONAL",
45-
"dependencies": []
69+
"dependencies": [],
70+
"pipelineStages": [
71+
{
72+
"durationMs": 80,
73+
"resultSize": 8,
74+
"counts": [
75+
8
76+
],
77+
"duplicationPercentages": [
78+
0
79+
]
80+
}
81+
]
4682
},
4783
{
4884
"predicateName": "QueryB::flowStep/2#mno345",
@@ -53,6 +89,18 @@
5389
"evaluationStrategy": "SIMPLE_INTENSIONAL",
5490
"dependencies": [
5591
"QueryB::entryPoint/0#jkl012"
92+
],
93+
"pipelineStages": [
94+
{
95+
"durationMs": 80,
96+
"resultSize": 12,
97+
"counts": [
98+
12
99+
],
100+
"duplicationPercentages": [
101+
0
102+
]
103+
}
56104
]
57105
},
58106
{
@@ -65,6 +113,18 @@
65113
"dependencies": [
66114
"QueryB::flowStep/2#mno345",
67115
"QueryB::entryPoint/0#jkl012"
116+
],
117+
"pipelineStages": [
118+
{
119+
"durationMs": 30,
120+
"resultSize": 2,
121+
"counts": [
122+
2
123+
],
124+
"duplicationPercentages": [
125+
0
126+
]
127+
}
68128
]
69129
}
70130
],
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
# CodeQL Evaluator Profile — Predicate Detail
2+
# Generated: 2026-03-10T13:53:19.907Z
3+
# Log format: raw
4+
# CodeQL version: 2.23.1
5+
# Use read_file with line ranges from the JSON response to access individual predicates.
6+
7+
== Query: ExampleQuery1.ql ==
8+
Total: 203.81ms | Predicates evaluated: 9 | Cache hits: 1
9+
10+
--- Files::Container.splitAbsolutePath/2#dispred#43b82b7b_120#join_rhs ---
11+
Eval order: 2 of 9
12+
Duration: 58.52 ms
13+
Result: 27 tuples
14+
Strategy: SIMPLE_INTENSIONAL
15+
Position: /home/runner/.codeql/packages/codeql/util/2.0.18/codeql/util/FileSystem.qll:220,5-221,90
16+
Dependencies (1):
17+
- cached_Files::Container.splitAbsolutePath/2#dispred#43b82b7b
18+
RA operations (2 steps):
19+
{3} r1 = SCAN `cached_Files::Container.splitAbsolutePath/2#dispred#43b82b7b` OUTPUT In.1, In.2, In.0
20+
return r1
21+
Pipeline stages (1):
22+
[1] 27.98ms -> 27 tuples (counts=[27])
23+
24+
--- files ---
25+
Eval order: 1 of 9
26+
Duration: 20.94 ms
27+
Result: 1 tuples
28+
Strategy: EXTENSIONAL
29+
Position: /home/runner/.codeql/packages/codeql/javascript-all/2.6.11/semmlecode.javascript.dbscheme:21,1-24,3
30+
31+
--- Files::Impl::File.getURL/0#dispred#3f789d74#bf ---
32+
Eval order: 6 of 9
33+
Duration: 11.28 ms
34+
Result: 1 tuples
35+
Strategy: SIMPLE_INTENSIONAL
36+
Position: /home/runner/.codeql/packages/codeql/util/2.0.18/codeql/util/FileSystem.qll:220,5-221,90
37+
Dependencies (2):
38+
- m#Files::Impl::File.getURL/0#dispred#3f789d74#bf
39+
- Files::Container.getAbsolutePath/0#dispred#051b95e1#bf
40+
RA operations (3 steps):
41+
{4} r1 = JOIN `m#Files::Impl::File.getURL/0#dispred#3f789d74#bf` WITH `Files::Container.getAbsolutePath/0#dispred#051b95e1#bf` ON FIRST 1 OUTPUT Lhs.0, _, Rhs.1, _
42+
{2} | REWRITE WITH Tmp.1 := "file://", Tmp.3 := ":0:0:0:0", Out.1 := (Tmp.1 ++ In.2 ++ Tmp.3) KEEPING 2
43+
return r1
44+
Pipeline stages (1):
45+
[1] 6.74ms -> 1 tuples (counts=[1, 1])
46+
47+
--- m#Files::Impl::File.getURL/0#dispred#3f789d74#bf ---
48+
Eval order: 3 of 9
49+
Duration: 9.62 ms
50+
Result: 1 tuples
51+
Strategy: SIMPLE_INTENSIONAL
52+
Position: /home/runner/.codeql/packages/codeql/util/2.0.18/codeql/util/FileSystem.qll:220,5-221,90
53+
Dependencies (2):
54+
- Files::Container.splitAbsolutePath/2#dispred#43b82b7b_120#join_rhs
55+
- files
56+
RA operations (4 steps):
57+
{2} r1 = CONSTANT(unique string, unique int)["ExampleQuery1.js",1]
58+
{1} | JOIN WITH `Files::Container.splitAbsolutePath/2#dispred#43b82b7b_120#join_rhs` ON FIRST 2 OUTPUT Rhs.2
59+
{1} | JOIN WITH files ON FIRST 1 OUTPUT Lhs.0
60+
return r1
61+
Pipeline stages (1):
62+
[1] 3.57ms -> 1 tuples (counts=[1, 1, 1])
63+
64+
--- #select#query ---
65+
Eval order: 9 of 9
66+
Duration: 9.01 ms
67+
Result: 1 tuples
68+
Strategy: SIMPLE_INTENSIONAL
69+
Position: /home/runner/work/codeql-development-mcp-server/codeql-development-mcp-server/server/ql/javascript/examples/src/ExampleQuery1/ExampleQuery1.ql:13,1-15,80
70+
Dependencies (5):
71+
- m#Files::Impl::File.getURL/0#dispred#3f789d74#bf
72+
- Files::Container.getAbsolutePath/0#dispred#051b95e1#bf
73+
- Files::Container.getAbsolutePath/0#dispred#051b95e1#bf_0#antijoin_rhs
74+
- Files::Impl::File.getURL/0#dispred#3f789d74#bf
75+
- Files::Impl::File.getURL/0#dispred#3f789d74#bf_0#antijoin_rhs
76+
RA operations (21 steps):
77+
{2} r1 = JOIN `m#Files::Impl::File.getURL/0#dispred#3f789d74#bf` WITH `Files::Container.getAbsolutePath/0#dispred#051b95e1#bf` ON FIRST 1 OUTPUT Lhs.0, Rhs.1
78+
79+
{1} r2 = `m#Files::Impl::File.getURL/0#dispred#3f789d74#bf` AND NOT `Files::Container.getAbsolutePath/0#dispred#051b95e1#bf_0#antijoin_rhs`(FIRST 1)
80+
{2} | SCAN OUTPUT In.0, _
81+
{2} | REWRITE WITH Out.1 := "(no string representation)"
82+
83+
{2} r3 = r1 UNION r2
84+
{4} | JOIN WITH `Files::Impl::File.getURL/0#dispred#3f789d74#bf` ON FIRST 1 OUTPUT Lhs.0, Lhs.1, Rhs.1, _
85+
{4} | REWRITE WITH Out.3 := "Example test code file found for codeql_test_extract example query."
86+
87+
{1} r4 = `m#Files::Impl::File.getURL/0#dispred#3f789d74#bf` AND NOT `Files::Container.getAbsolutePath/0#dispred#051b95e1#bf_0#antijoin_rhs`(FIRST 1)
88+
{2} | SCAN OUTPUT In.0, _
89+
{2} | REWRITE WITH Out.1 := "(no string representation)"
90+
91+
{2} r5 = r1 UNION r4
92+
{2} | AND NOT `Files::Impl::File.getURL/0#dispred#3f789d74#bf_0#antijoin_rhs`(FIRST 1)
93+
{4} | SCAN OUTPUT In.0, In.1, _, _
94+
{4} | REWRITE WITH Out.2 := "", Out.3 := "Example test code file found for codeql_test_extract example query."
95+
96+
{4} r6 = r3 UNION r5
97+
return r6
98+
Pipeline stages (1):
99+
[1] 4.21ms -> 1 tuples (counts=[1, -1, -1, 0, 0, -1, 1, 1, 1, -1, -1, 0, 0, -1, 1, -1, 0, 0, -1, 1])
100+
101+
--- Files::Container.getAbsolutePath/0#dispred#051b95e1#bf ---
102+
Eval order: 5 of 9
103+
Duration: 4.14 ms
104+
Result: 1 tuples
105+
Strategy: SIMPLE_INTENSIONAL
106+
Position: /home/runner/.codeql/packages/codeql/util/2.0.18/codeql/util/FileSystem.qll:63,5-87,66
107+
Dependencies (2):
108+
- m#Files::Container.getAbsolutePath/0#dispred#051b95e1#bf
109+
- files
110+
RA operations (2 steps):
111+
{2} r1 = JOIN `m#Files::Container.getAbsolutePath/0#dispred#051b95e1#bf` WITH files ON FIRST 1 OUTPUT Lhs.0, Rhs.1
112+
return r1
113+
Pipeline stages (1):
114+
[1] 0.47ms -> 1 tuples (counts=[1])
115+
116+
--- Files::Container.getAbsolutePath/0#dispred#051b95e1#bf_0#antijoin_rhs ---
117+
Eval order: 8 of 9
118+
Duration: 3.71 ms
119+
Result: 1 tuples
120+
Strategy: SIMPLE_INTENSIONAL
121+
Position: /home/runner/work/codeql-development-mcp-server/codeql-development-mcp-server/server/ql/javascript/examples/src/ExampleQuery1/ExampleQuery1.ql:13,1-15,80
122+
Dependencies (1):
123+
- Files::Container.getAbsolutePath/0#dispred#051b95e1#bf
124+
RA operations (2 steps):
125+
{1} r1 = SCAN `Files::Container.getAbsolutePath/0#dispred#051b95e1#bf` OUTPUT In.0
126+
return r1
127+
Pipeline stages (1):
128+
[1] 0.30ms -> 1 tuples (counts=[1])
129+
130+
--- m#Files::Container.getAbsolutePath/0#dispred#051b95e1#bf ---
131+
Eval order: 4 of 9
132+
Duration: 2.81 ms
133+
Result: 1 tuples
134+
Strategy: SIMPLE_INTENSIONAL
135+
Position: /home/runner/.codeql/packages/codeql/util/2.0.18/codeql/util/FileSystem.qll:63,5-87,66
136+
Dependencies (1):
137+
- m#Files::Impl::File.getURL/0#dispred#3f789d74#bf
138+
RA operations (1 steps):
139+
return `m#Files::Impl::File.getURL/0#dispred#3f789d74#bf`
140+
Pipeline stages (1):
141+
[1] 2.43ms -> 1 tuples (counts=[])
142+
143+
--- Files::Impl::File.getURL/0#dispred#3f789d74#bf_0#antijoin_rhs ---
144+
Eval order: 7 of 9
145+
Duration: 0.72 ms
146+
Result: 1 tuples
147+
Strategy: SIMPLE_INTENSIONAL
148+
Position: /home/runner/work/codeql-development-mcp-server/codeql-development-mcp-server/server/ql/javascript/examples/src/ExampleQuery1/ExampleQuery1.ql:13,1-15,80
149+
Dependencies (1):
150+
- Files::Impl::File.getURL/0#dispred#3f789d74#bf
151+
RA operations (2 steps):
152+
{1} r1 = SCAN `Files::Impl::File.getURL/0#dispred#3f789d74#bf` OUTPUT In.0
153+
return r1
154+
Pipeline stages (1):
155+
[1] 0.35ms -> 1 tuples (counts=[1])

0 commit comments

Comments
 (0)