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

[CI] Track performance numbers on a webpage #1035

Merged
merged 10 commits into from
Jan 20, 2025
Merged

[CI] Track performance numbers on a webpage #1035

merged 10 commits into from
Jan 20, 2025

Conversation

Yu-Zhewen
Copy link
Contributor

@Yu-Zhewen Yu-Zhewen commented Jan 16, 2025

The workflow:

  • run performance benchmarks the same way as before, generating performance.log
  • convert performance.log into results.json
  • switch to the gh-pages branch
  • append the new results.json data to results_history.json
  • create results_history.html based on the updated results_history.json

(only when CI is triggered from the main branch)

  • commit the updated results_history.json and results_history.html using the action bot

To preview what it looks like: https://rawcdn.githack.com/nod-ai/iree-amd-aie/a70ddbeea9d0b0d14f8ab24208efc599bc3c2f39/results_history.html

I don’t have access to set up the webpage for this repository, but once the gh-pages branch is properly configured, the webpage shall be live on https://nod-ai.github.io/iree-amd-aie/results_history.html

@Yu-Zhewen Yu-Zhewen changed the title [CI][WIP][Do Not Review] Track performance numbers on a webpage [CI] Track performance numbers on a webpage Jan 17, 2025
@Yu-Zhewen Yu-Zhewen marked this pull request as ready for review January 17, 2025 15:39
Copy link
Contributor

@yzhang93 yzhang93 left a comment

Choose a reason for hiding this comment

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

This plot looks nice. Thanks for developing this!

I think this is a good start point for performance tracking. We can gradually optimize this once we look at the graph with more commits history. Just one trivial comment.

results_html_path = sys.argv[3]

# Get the results for the current run.
with open(results_json_path, "r") as f:
Copy link
Contributor

Choose a reason for hiding this comment

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

I would suggest to put everything below this to a separate function. And the main only check the arguments and call the function.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks. Done

Copy link
Contributor

@newling newling left a comment

Choose a reason for hiding this comment

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

looks great!

if len(sys.argv) != 4:
print(
"Usage: python3 performance_publish.py <path_to_results_json> <path_to_results_history> <path_to_results_html>\n"
"This script reads the performance results from the specified JSON file, appends them to the history file, and generates an HTML visualizarion.\n"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"This script reads the performance results from the specified JSON file, appends them to the history file, and generates an HTML visualizarion.\n"
"This script reads the performance results from the specified JSON file, appends them to the history file, and generates an HTML visualization.\n"

@Yu-Zhewen Yu-Zhewen enabled auto-merge (squash) January 20, 2025 17:15
@Yu-Zhewen Yu-Zhewen merged commit 4e21f8d into main Jan 20, 2025
6 checks passed
@Yu-Zhewen Yu-Zhewen deleted the zhewen_track_perf branch January 20, 2025 17:41
Yu-Zhewen added a commit that referenced this pull request Jan 21, 2025
The workflow: 

- run performance benchmarks the same way as before, generating
`performance.log`
- convert `performance.log` into `results.json`
- switch to the `gh-pages` branch
- append the new  `results.json` data to `results_history.json`
- create `results_history.html` based on the updated
`results_history.json`

(only when CI is triggered from the `main` branch)
- commit the updated `results_history.json` and `results_history.html`
using the action bot

To preview what it looks like:
[https://rawcdn.githack.com/nod-ai/iree-amd-aie/a70ddbeea9d0b0d14f8ab24208efc599bc3c2f39/results_history.html](https://rawcdn.githack.com/nod-ai/iree-amd-aie/a70ddbeea9d0b0d14f8ab24208efc599bc3c2f39/results_history.html)

I don’t have access to set up the webpage for this repository, but once
the `gh-pages` branch is properly configured, the webpage shall be live
on
[https://nod-ai.github.io/iree-amd-aie/results_history.html](https://nod-ai.github.io/iree-amd-aie/results_history.html)
@jtuyls
Copy link
Collaborator

jtuyls commented Jan 21, 2025

@Yu-Zhewen This site doesn't seem to be live: https://nod-ai.github.io/iree-amd-aie/results_history.html

@Yu-Zhewen
Copy link
Contributor Author

@Yu-Zhewen This site doesn't seem to be live: https://nod-ai.github.io/iree-amd-aie/results_history.html

Some additional setup is required to configure the gh-pages branch as the publishing source. Here's the relevant documentation for reference:

https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#publishing-from-a-branch

I don’t have the necessary access to make this change. Could someone with the appropriate permissions assist?

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.

4 participants