Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[summary] Make PR comment pretty #2946

Merged
merged 2 commits into from
Nov 26, 2024
Merged

Conversation

ndr-ds
Copy link
Contributor

@ndr-ds ndr-ds commented Nov 23, 2024

Motivation

Right now we're only commenting the JSON of the results, we can probably do better

Proposal

Comment a formatted Markdown of the results

Test Plan

Since #2936 is not merged yet, I have to test this in the same way I tested #2936

Release Plan

  • Nothing to do / These changes follow the usual release cycle.

Copy link
Contributor Author

ndr-ds commented Nov 23, 2024

@ndr-ds ndr-ds mentioned this pull request Nov 23, 2024
4 tasks
@ndr-ds ndr-ds force-pushed the 11-22-_summary_make_pr_comment_pretty branch 2 times, most recently from ebea4ad to 205372f Compare November 23, 2024 02:47
Copy link

Performance Summary for commit 1cb21b6

CI Runtime Comparison

Workflow: Rust

Metric Base Runtime PR Runtime Runtime Difference (%)
web 4m 10s 4m 12s 0.80%
default-features-and-witty-integration-test 24m 12s 25m 17s 4.48%
wasm-application-test 10m 11s 10m 10s -0.16%
ethereum-tests 6m 52s 11m 37s 69.17%
remote-net-test 18m 53s 19m 8s 1.32%
benchmark-test 7m 17s 7m 38s 4.81%
execution-wasmtime-test 1m 28s 1m 28s 0.00%
storage-service-tests 25m 54s 24m 35s -5.08%

@ndr-ds ndr-ds force-pushed the 11-22-_summary_make_pr_comment_pretty branch 2 times, most recently from 02c067b to f4d0da9 Compare November 23, 2024 03:30
Copy link

Performance Summary for commit 1cb21b6

CI Runtime Comparison

Workflow: Rust

Job Name Base Runtime PR Runtime Runtime Difference (%)
storage-service-tests 25m 54s 24m 35s <style>-5.08%{color:red;}</style>
ethereum-tests 6m 52s 11m 37s <style>69.17%{color:green;}</style>
remote-net-test 18m 53s 19m 8s <style>1.32%{color:green;}</style>
wasm-application-test 10m 11s 10m 10s <style>-0.16%{color:red;}</style>
web 4m 10s 4m 12s <style>0.80%{color:green;}</style>
execution-wasmtime-test 1m 28s 1m 28s <style>0.00%{color:green;}</style>
benchmark-test 7m 17s 7m 38s <style>4.81%{color:green;}</style>
default-features-and-witty-integration-test 24m 12s 25m 17s <style>4.48%{color:green;}</style>

@ndr-ds ndr-ds force-pushed the 11-22-_summary_make_pr_comment_pretty branch from f4d0da9 to 05bd4fd Compare November 23, 2024 03:44
Copy link

Performance Summary for commit 1cb21b6

CI Runtime Comparison

Workflow: Rust

Job Name Base Runtime PR Runtime Runtime Difference (%)
ethereum-tests 6m 52s 11m 37s 69.17%
execution-wasmtime-test 1m 28s 1m 28s 0.00%
web 4m 10s 4m 12s 0.80%
remote-net-test 18m 53s 19m 8s 1.32%
wasm-application-test 10m 11s 10m 10s -0.16%
storage-service-tests 25m 54s 24m 35s -5.08%
benchmark-test 7m 17s 7m 38s 4.81%
default-features-and-witty-integration-test 24m 12s 25m 17s 4.48%

@ndr-ds ndr-ds force-pushed the 11-22-_summary_make_pr_comment_pretty branch from 05bd4fd to 324dd57 Compare November 23, 2024 03:49
@ndr-ds ndr-ds force-pushed the 11-16-track_ci_job_runtime branch from fceadb0 to 1870f37 Compare November 25, 2024 15:13
@ndr-ds ndr-ds force-pushed the 11-22-_summary_make_pr_comment_pretty branch from 324dd57 to 96d32d0 Compare November 25, 2024 15:13
@ndr-ds ndr-ds force-pushed the 11-16-track_ci_job_runtime branch from 1870f37 to a988c06 Compare November 25, 2024 19:16
@ndr-ds ndr-ds force-pushed the 11-22-_summary_make_pr_comment_pretty branch 2 times, most recently from 1599423 to 79ac932 Compare November 25, 2024 20:16
Copy link
Contributor

@jvff jvff left a comment

Choose a reason for hiding this comment

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

The summaries are looking really good!

}

// The key is the name of the workflow, and the value is a list of per job comparisons.
#[derive(Serialize)]
pub struct CiRuntimeComparison(HashMap<WorkflowName, Vec<WorkflowJobRuntimeComparison>>);
pub struct CiRuntimeComparison(pub HashMap<WorkflowName, Vec<WorkflowJobRuntimeComparison>>);
Copy link
Contributor

Choose a reason for hiding this comment

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

Optional idea: we could sort the workflow results by name (will probably require updates to the import and to the collect below).

Suggested change
pub struct CiRuntimeComparison(pub HashMap<WorkflowName, Vec<WorkflowJobRuntimeComparison>>);
pub struct CiRuntimeComparison(pub BTreeMap<WorkflowName, Vec<WorkflowJobRuntimeComparison>>);

Copy link
Contributor Author

ndr-ds commented Nov 26, 2024

Merge activity

  • Nov 25, 7:04 PM EST: A user started a stack merge that includes this pull request via Graphite.
  • Nov 25, 7:06 PM EST: Graphite rebased this pull request as part of a merge.
  • Nov 25, 7:07 PM EST: A user merged this pull request with Graphite.

@ndr-ds ndr-ds changed the base branch from 11-16-track_ci_job_runtime to graphite-base/2946 November 26, 2024 00:04
ndr-ds added a commit that referenced this pull request Nov 26, 2024
## Motivation

It would be nice to see CI runtime regressions or improvements in the PRs.

## Proposal

Create Rust CLI tool that checks runtimes, compares against base ref, and comments on the PR with a summary of the changes.
This works, but as you guys can see it's pretty ugly for now, we're just posting the JSON 😅
We're also commenting for every successful workflow run in CI.

The PR is already pretty big so I will do the following follow ups:
- [x] Markdown format this in a pretty way (done in #2946)
- [x] Add the performance summary markdown as a [job summary](https://github.blog/news-insights/product-news/supercharging-github-actions-with-job-summaries/) of the job, so people have access to historical versions of this (done in #2948)
- [x] Find if there's already a performance summary comment, and edit it instead of always posting a new one (done in #2953)
- [ ] Might make sense to only post if the change exceeds some percentage threshold for now. Open to suggestions

Other follow ups are tracked in the issue for this: #2834

## Test Plan

Triggered a modified version of this manually with workflow dispatch, it works, but we can unfortunately only know for sure this works by merging :/ 

## Release Plan

- Nothing to do / These changes follow the usual release cycle.
@ndr-ds ndr-ds changed the base branch from graphite-base/2946 to main November 26, 2024 00:04
@ndr-ds ndr-ds force-pushed the 11-22-_summary_make_pr_comment_pretty branch from d4718b5 to 666a16b Compare November 26, 2024 00:05
@ndr-ds ndr-ds merged commit 966a9ad into main Nov 26, 2024
23 checks passed
@ndr-ds ndr-ds deleted the 11-22-_summary_make_pr_comment_pretty branch November 26, 2024 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants