mirror of
https://github.com/github/codeql-action.git
synced 2026-10-03 17:41:28 +00:00
Add tools download durations to the init status report
Surface `tools_extraction_duration_ms` and `tools_total_duration_ms` from both the `init` and `setup-codeql` actions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 628ce334-991a-4578-9c1b-93d2e96bbddb
This commit is contained in:
@@ -174,6 +174,14 @@ async function sendCompletedStatusReport(
|
|||||||
initToolsDownloadFields.tools_download_duration_ms =
|
initToolsDownloadFields.tools_download_duration_ms =
|
||||||
toolsDownloadStatusReport.downloadDurationMs;
|
toolsDownloadStatusReport.downloadDurationMs;
|
||||||
}
|
}
|
||||||
|
if (toolsDownloadStatusReport?.extractionDurationMs !== undefined) {
|
||||||
|
initToolsDownloadFields.tools_extraction_duration_ms =
|
||||||
|
toolsDownloadStatusReport.extractionDurationMs;
|
||||||
|
}
|
||||||
|
if (toolsDownloadStatusReport?.totalDurationMs !== undefined) {
|
||||||
|
initToolsDownloadFields.tools_total_duration_ms =
|
||||||
|
toolsDownloadStatusReport.totalDurationMs;
|
||||||
|
}
|
||||||
if (toolsFeatureFlagsValid !== undefined) {
|
if (toolsFeatureFlagsValid !== undefined) {
|
||||||
initToolsDownloadFields.tools_feature_flags_valid = toolsFeatureFlagsValid;
|
initToolsDownloadFields.tools_feature_flags_valid = toolsFeatureFlagsValid;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,6 +85,14 @@ async function sendCompletedStatusReport(
|
|||||||
initToolsDownloadFields.tools_download_duration_ms =
|
initToolsDownloadFields.tools_download_duration_ms =
|
||||||
toolsDownloadStatusReport.downloadDurationMs;
|
toolsDownloadStatusReport.downloadDurationMs;
|
||||||
}
|
}
|
||||||
|
if (toolsDownloadStatusReport?.extractionDurationMs !== undefined) {
|
||||||
|
initToolsDownloadFields.tools_extraction_duration_ms =
|
||||||
|
toolsDownloadStatusReport.extractionDurationMs;
|
||||||
|
}
|
||||||
|
if (toolsDownloadStatusReport?.totalDurationMs !== undefined) {
|
||||||
|
initToolsDownloadFields.tools_total_duration_ms =
|
||||||
|
toolsDownloadStatusReport.totalDurationMs;
|
||||||
|
}
|
||||||
if (toolsFeatureFlagsValid !== undefined) {
|
if (toolsFeatureFlagsValid !== undefined) {
|
||||||
initToolsDownloadFields.tools_feature_flags_valid = toolsFeatureFlagsValid;
|
initToolsDownloadFields.tools_feature_flags_valid = toolsFeatureFlagsValid;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -620,8 +620,21 @@ export interface InitWithConfigStatusReport extends InitStatusReport {
|
|||||||
|
|
||||||
/** Fields of the init status report populated when the tools source is `download`. */
|
/** Fields of the init status report populated when the tools source is `download`. */
|
||||||
export interface InitToolsDownloadFields {
|
export interface InitToolsDownloadFields {
|
||||||
/** Time taken to download the bundle, in milliseconds. */
|
/**
|
||||||
|
* Time taken to download the bundle, in milliseconds. Not populated when the bundle is downloaded
|
||||||
|
* and extracted concurrently.
|
||||||
|
*/
|
||||||
tools_download_duration_ms?: number;
|
tools_download_duration_ms?: number;
|
||||||
|
/**
|
||||||
|
* Time taken to extract the bundle, in milliseconds. Not populated when the bundle is downloaded
|
||||||
|
* and extracted concurrently.
|
||||||
|
*/
|
||||||
|
tools_extraction_duration_ms?: number;
|
||||||
|
/**
|
||||||
|
* Total time taken to make the bundle available on disk, in milliseconds. This includes any time
|
||||||
|
* spent on a streaming attempt that failed and fell back to downloading before extracting.
|
||||||
|
*/
|
||||||
|
tools_total_duration_ms?: number;
|
||||||
/**
|
/**
|
||||||
* Whether the relevant tools dotcom feature flags have been misconfigured.
|
* Whether the relevant tools dotcom feature flags have been misconfigured.
|
||||||
* Only populated if we attempt to determine the default version based on the dotcom feature flags. */
|
* Only populated if we attempt to determine the default version based on the dotcom feature flags. */
|
||||||
|
|||||||
Reference in New Issue
Block a user