You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
\[Plumbing] Support for running queries from IDEs.
33
+
\[Deprecated]\[Plumbing] Support for running queries from IDEs.
34
34
35
-
This command is only relevant for authors of QL language extensions for
36
-
IDEs. It is started by the IDE plugin in the background and communicates
37
-
with it through a special protocol on its standard input and output
38
-
streams.
39
-
40
-
The IDE extensions should use
41
-
[codeql resolve ram](/code-security/codeql-cli/codeql-cli-manual/resolve-ram) to construct options for RAM limits before starting the query server.
35
+
The
36
+
[codeql execute query-server](/code-security/codeql-cli/codeql-cli-manual/execute-query-server) subcommand is unsupported and no longer works. If you are using the official CodeQL extension for Visual Studio Code, please upgrade the extension to 1.7.6 or a later version. Otherwise please migrate your CodeQL IDE integration to the `codeql execute query-server2` subcommand.
42
37
43
38
## Primary options
44
39
45
-
#### `--[no-]tuple-counting`
46
-
47
-
\[Advanced] Display tuple counts for each evaluation step in the query
48
-
evaluator logs. If the `--evaluator-log` option is provided, tuple
49
-
counts will be included in both the text-based and structured JSON logs
50
-
produced by the command. (This can be useful for performance
51
-
optimization of complex QL code).
52
-
53
-
#### `--timeout=<seconds>`
54
-
55
-
\[Advanced] Set the timeout length for query evaluation, in seconds.
56
-
57
-
The timeout feature is intended to catch cases where a complex query
58
-
would take "forever" to evaluate. It is not an effective way to limit
59
-
the total amount of time the query evaluation can take. The evaluation
60
-
will be allowed to continue as long as each separately timed part of the
61
-
computation completes within the timeout. Currently these separately
62
-
timed parts are "RA layers" of the optimized query, but that might
63
-
change in the future.
64
-
65
-
If no timeout is specified, or is given as 0, no timeout will be set
66
-
(except for [codeql test run](/code-security/codeql-cli/codeql-cli-manual/test-run), where the default timeout is 5 minutes).
67
-
68
-
#### `-j, --threads=<num>`
69
-
70
-
Use this many threads to evaluate queries.
71
-
72
-
Defaults to 1. You can pass 0 to use one thread per core on the machine,
73
-
or -_N_ to leave _N_ cores unused (except still use at least one
74
-
thread).
75
-
76
-
#### `--[no-]save-cache`
77
-
78
-
\[Advanced] Aggressively write intermediate results to the disk cache.
79
-
This takes more time and uses (much) more disk space, but may speed up
80
-
the subsequent execution of similar queries.
81
-
82
-
#### `--[no-]expect-discarded-cache`
83
-
84
-
\[Advanced] Make decisions about which predicates to evaluate, and what
85
-
to write to the disk cache, based on the assumption that the cache will
86
-
be discarded after the queries have been executed.
87
-
88
-
#### `--[no-]keep-full-cache`
89
-
90
-
\[Advanced] Don't clean up the disk cache after evaluation completes.
91
-
This may save time if you're going to do [codeql dataset cleanup](/code-security/codeql-cli/codeql-cli-manual/dataset-cleanup) or [codeql database cleanup](/code-security/codeql-cli/codeql-cli-manual/database-cleanup) afterwards anyway.
92
-
93
-
#### `--max-disk-cache=<MB>`
94
-
95
-
Set the maximum amount of space that the disk cache for intermediate
96
-
query results can use.
97
-
98
-
If this size is not configured explicitly, the evaluator will try to use
99
-
a "reasonable" amount of cache space, based on the size of the dataset
100
-
and the complexity of the queries. Explicitly setting a higher limit
101
-
than this default usage will enable additional caching which can speed
102
-
up later queries.
103
-
104
-
#### `--min-disk-free=<MB>`
105
-
106
-
\[Advanced] Set target amount of free space on file system.
107
-
108
-
If `--max-disk-cache` is not given, the evaluator will try hard to
109
-
curtail disk cache usage if the free space on the file system drops
110
-
below this value.
111
-
112
-
#### `--min-disk-free-pct=<pct>`
113
-
114
-
\[Advanced] Set target fraction of free space on file system.
115
-
116
-
If `--max-disk-cache` is not given, the evaluator will try hard to
117
-
curtail disk cache usage if the free space on the file system drops
118
-
below this percentage.
119
-
120
-
#### `--external=<pred>=<file.csv>`
121
-
122
-
A CSV file that contains rows for external predicate `<pred>`.
123
-
Multiple `--external` options can be supplied.
124
-
125
-
#### `--xterm-progress=<mode>`
126
-
127
-
\[Advanced] Controls whether to show progress tracking during QL
128
-
evaluation using xterm control sequences. Possible values are:
129
-
130
-
`no`: Never produce fancy progress; assume a dumb terminal.
131
-
132
-
`auto`_(default)_: Autodetect whether the command is running in an
133
-
appropriate terminal.
134
-
135
-
`yes`: Assume the terminal can understand xterm control sequences. The
136
-
feature still depends on being able to autodetect the _size_ of the
137
-
terminal, and will also be disabled if `-q` is given.
138
-
139
-
`25x80` (or similar): Like `yes`, and also explicitly give the size of
140
-
the terminal.
141
-
142
-
`25x80:/dev/pts/17` (or similar): show fancy progress on a _different_
143
-
terminal than stderr. Mostly useful for internal testing.
144
-
145
-
### Options for controlling outputting of structured evaluator logs
146
-
147
-
#### `--evaluator-log=<file>`
148
-
149
-
\[Advanced] Output structured logs about evaluator performance to the
150
-
given file. The format of this log file is subject to change with no
151
-
notice, but will be a stream of JSON objects separated by either two
152
-
newline characters (by default) or one if the `--evaluator-log-minify`
153
-
option is passed. Please use `codeql generate log-summary <file>` to
154
-
produce a more stable summary of this file, and avoid parsing the file
155
-
directly. The file will be overwritten if it already exists.
156
-
157
-
#### `--evaluator-log-minify`
158
-
159
-
\[Advanced] If the `--evaluator-log` option is passed, also passing
160
-
this option will minimize the size of the JSON log produced, at the
0 commit comments