Skip to content

feat(ci): upload metrics to GitHub Artifacts ✨#116517

Closed
meysam81 wants to merge 11 commits into
rust-lang:masterfrom
meysam81:meysam/feat/upload-ci-metrics-to-artifacts
Closed

feat(ci): upload metrics to GitHub Artifacts ✨#116517
meysam81 wants to merge 11 commits into
rust-lang:masterfrom
meysam81:meysam/feat/upload-ci-metrics-to-artifacts

Conversation

@meysam81

@meysam81 meysam81 commented Oct 7, 2023

Copy link
Copy Markdown
Contributor

@rustbot

rustbot commented Oct 7, 2023

Copy link
Copy Markdown
Collaborator

r? @Mark-Simulacrum

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Oct 7, 2023
@meysam81 meysam81 changed the title meysam/feat/upload ci metrics to artifacts feat(ci): upload metrics to GitHub Artifacts ✨ Oct 7, 2023
@meysam81

meysam81 commented Oct 7, 2023

Copy link
Copy Markdown
Contributor Author

r? @jdno

@rustbot rustbot assigned jdno and unassigned Mark-Simulacrum Oct 7, 2023

@jdno jdno left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also generate detailed metrics in x.py, which we should upload. Here's the relevant step in upload-artifacts.sh:

cp "${build_dir}/metrics.json" "${upload_dir}/metrics-${CI_JOB_NAME}.json"

I didn't notice before that build_dir is a variable that has two different values, based on the operating system:

build_dir=build
if isLinux; then
    build_dir=obj/build
fi

So simply invoking actions/upload-artifact might not be enough. 😬

I am wondering if it would make sense to create a script to gather the build metrics that we can call in both upload-artifacts.sh and in a step before actions/upload-artifact. In other words, move these instructions into a script and call it in both places:

# CPU usage statistics.
cp build/cpu-usage.csv "${upload_dir}/cpu-${CI_JOB_NAME}.csv"

# Build metrics generated by x.py.
cp "${build_dir}/metrics.json" "${upload_dir}/metrics-${CI_JOB_NAME}.json"

What do you think?

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@Dylan-DPC

Copy link
Copy Markdown
Member

@jdno any updates on the review? thanks

@bors

bors commented Apr 24, 2024

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #124175) made this pull request unmergeable. Please resolve the merge conflicts.

@Dylan-DPC

Copy link
Copy Markdown
Member

r? infra

@rustbot rustbot assigned shepmaster and unassigned jdno Aug 1, 2024
@meysam81 meysam81 closed this by deleting the head repository Sep 3, 2024
@Dylan-DPC Dylan-DPC added S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-testsuite Area: The testsuite used to check the correctness of rustc S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upload metrics from PR CI as artifacts in GitHub Actions

8 participants