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

Generate Kani Metrics #235

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open

Conversation

carolynzech
Copy link

@carolynzech carolynzech commented Jan 8, 2025

Add a new "Kani Metrics" workflow (that runs every week) that calls ./scripts/run-kani --run metrics, then creates a pull request to this repository with the computed metrics. See here for an example of what the pull request will look like. Also update our "Build Book" workflow to publish graphs of the metrics.

Callouts:

  • This is a separate workflow from the Kani workflow because it is a cronjob instead of running on every pull request. I thought the plots would be too noisy if we ran on every PR.
  • See the "Notes" section of kani_std_analysis.py for other callouts.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.

@carolynzech carolynzech requested a review from a team as a code owner January 8, 2025 22:17
@carolynzech carolynzech requested a review from tautschnig January 8, 2025 22:17
.github/workflows/kani-metrics.yml Outdated Show resolved Hide resolved
.gitignore Outdated Show resolved Hide resolved
scripts/kani-std-analysis/kani_std_analysis.py Outdated Show resolved Hide resolved
Copy link

@feliperodri feliperodri left a comment

Choose a reason for hiding this comment

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

LGTM modulo minor fixes.

.github/workflows/kani-metrics.yml Outdated Show resolved Hide resolved
scripts/kani-std-analysis/metrics-data.json Show resolved Hide resolved
scripts/kani-std-analysis/requirements.txt Outdated Show resolved Hide resolved
scripts/kani-std-analysis/kani_std_analysis.py Outdated Show resolved Hide resolved
@feliperodri feliperodri added the Maintenance Maintenance related issues for the challange label Jan 14, 2025
@carolynzech carolynzech enabled auto-merge January 14, 2025 15:26
@carolynzech carolynzech added this pull request to the merge queue Jan 14, 2025
@carolynzech carolynzech removed this pull request from the merge queue due to a manual request Jan 14, 2025
Copy link

@celinval celinval left a comment

Choose a reason for hiding this comment

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

Thank you for holding off the merge. I don't think we should upload images to our repo to avoid unnecessarily growing its size. Per our offline discussion, I think we can keep running this weekly job to collect the metrics, and we can plot those metrics as part of building our book.

@carolynzech
Copy link
Author

Per our offline discussion, I think we can keep running this weekly job to collect the metrics, and we can plot those metrics as part of building our book.

@celinval I've made these changes. The kani-metrics workflow now only changes one file, metrics-data.json, and creates a weekly pull request to update it. See the updated PR on my fork.

Separately, the "Build Book" workflow reads from that file, plots the data, then puts it in the book. See the book on my fork to see what it'll look like.

@carolynzech carolynzech requested a review from celinval January 16, 2025 14:51
.github/workflows/book.yml Outdated Show resolved Hide resolved
Comment on lines 32 to 37
- name: Generate Metrics Graphs
run: |
cd scripts/kani-std-analysis/
python kani_std_analysis.py --plot-only
cd ../..
mv scripts/kani-std-analysis/*.png doc/src/metrics/kani/

Choose a reason for hiding this comment

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

This should be a mdbook pre-processor. Can you make sure we can still build the book if the png files are not there?

Copy link
Author

@carolynzech carolynzech Jan 17, 2025

Choose a reason for hiding this comment

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

Done (sort of). I got it working for mdbook build doc but not mdbook build inside the doc/ directory. At the moment, I can't really see a way around it because we need to pass a --manifest-path to the preprocessor (this is how the example does it too).

Copy link
Author

Choose a reason for hiding this comment

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

doc/src/metrics.md Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Maintenance Maintenance related issues for the challange
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants