mirror of
https://github.com/github/codeql.git
synced 2026-05-01 19:55:15 +02:00
Kotlin: Record compilation and extraction times
This commit is contained in:
@@ -116,6 +116,17 @@ diagnostic_for(
|
||||
int file_number_diagnostic_number : int ref
|
||||
);
|
||||
|
||||
/**
|
||||
* The `cpu_seconds` and `elapsed_seconds` are the CPU time and elapsed
|
||||
* time (respectively) that the original compilation (not the extraction)
|
||||
* took for compiler invocation `id`.
|
||||
*/
|
||||
compilation_compiler_times(
|
||||
unique int id : @compilation ref,
|
||||
float cpu_seconds : float ref,
|
||||
float elapsed_seconds : float ref
|
||||
);
|
||||
|
||||
/**
|
||||
* If extraction was successful, then `cpu_seconds` and
|
||||
* `elapsed_seconds` are the CPU time and elapsed time (respectively)
|
||||
|
||||
@@ -70,6 +70,18 @@ class Compilation extends @compilation {
|
||||
*/
|
||||
string getArgument(int i) { compilation_args(this, i, result) }
|
||||
|
||||
/**
|
||||
* Gets the total amount of CPU time spent processing all the files in the
|
||||
* compiler.
|
||||
*/
|
||||
float getCompilerCpuSeconds() { compilation_compiler_times(this, result, _) }
|
||||
|
||||
/**
|
||||
* Gets the total amount of elapsed time while processing all the files in
|
||||
* the compiler.
|
||||
*/
|
||||
float getCompilerElapsedSeconds() { compilation_compiler_times(this, _, result) }
|
||||
|
||||
/**
|
||||
* Gets the total amount of CPU time spent processing all the files in the
|
||||
* front-end and extractor.
|
||||
|
||||
Reference in New Issue
Block a user