Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Coersi99 committed Jan 17, 2024
2 parents 96e4d3c + 9bfd946 commit 63367ee
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 6 deletions.
37 changes: 31 additions & 6 deletions local_plotting/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,37 @@
## How to locally plot native image build data using the cloned git repository
# How to locally plot native image build data using the cloned git repository

1) On GitHub, enable the 'Read and write permissions' under 'Workflow permissions' to ensure that the report data can be persisted (link: https://github.com/user_account/repo_name/settings/actions)
## Persist build data
Make sure your build metric data are persisted in GitHub.
If not no plot for native image build data can be created.
To persist your build data by building native images with GitHub actions enable the `Read and write permissions` under `Workflow permissions` (link: https://github.com/user_account/repo_name/settings/actions).

2) Make sure that the correct git repository has been cloned and that the branches of interest have been checked out
## Install dependencies
Install python with Version `3.12`.

3) Depending on your platform, either run __*git fetch origin refs/graalvm-metrics/\*:refs/graalvm-metrics/\**__ or __*git fetch origin 'refs/graalvm-metrics/\*:refs/graalvm-metrics/\*'*__ on each branch to fetch all the metric references that contain the report data
Install `pip`

4) To plot the data, make sure that you are in your cloned git repository and run:<br><br> __*py local_plotting/main.py [repo_path] [branch] [n] [metrics_type]*__<br><br> With the options being: <br> *repo_path* = relative path to local git repository<br>*branch* = name of the branch<br>*n* = last n builds to be plotted<br>*metrics_type* = Type of report metrics to be visualized. Either 'image_details', 'analysis_results', or 'resource_usage'
Run `pip install -r local_plotting/requirements.txt`

5) The plot should show up in the browser and a copy of the .html is safed under */local_plotting/output*
## Get metric data
Check out the branches of interest.

Depending on your platform, either run:
* `git fetch origin refs/graalvm-metrics/*:refs/graalvm-metrics/*` or
* `git fetch origin 'refs/graalvm-metrics/*:refs/graalvm-metrics/*'`

on each branch to fetch all the metric references that contain the report data.


## Plot Data
To plot the data, make sure that you are in your cloned git repository and run:

`py local_plotting/main.py [repo_path] [branch] [n] [metrics_type]`

Parameters:
`repo_path` = relative path to local git repository
`branch` = name of the branch
`n` = last n builds to be plotted
`metrics_type` = Type of report metrics to be visualized. Either 'image_details', 'analysis_results', or 'resource_usage'

The plot should show up in the browser and a copy of the .html is saved under `/local_plotting/output`

5 changes: 5 additions & 0 deletions local_plotting/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pygit2==1.13.3
pandas==2.1.4
datetime3==3.8.0
argparse3==0.0.0
plotly==5.18.0

0 comments on commit 63367ee

Please sign in to comment.