Skip to content

Commit

Permalink
[build stats] add PGO build times
Browse files Browse the repository at this point in the history
  • Loading branch information
kwk committed Aug 19, 2024
1 parent 38b7fa5 commit b1c1cdc
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/update-build-time-diagrams.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ jobs:
if ${{ env.get_stats }}; then
main/scripts/get-build-stats.py --copr-projectname llvm-snapshots-incubator-`date '+%Y%m%d'` | tee -a gh-pages/build-stats.csv
main/scripts/get-build-stats.py --copr-projectname llvm-snapshots-big-merge-`date '+%Y%m%d'` | tee -a gh-pages/build-stats-big-merge.csv
main/scripts/get-build-stats.py --copr-projectname llvm-snapshots-bootstrap-`date '+%Y%m%d'` | tee -a gh-pages/build-stats-bootstrap.csv
git -C gh-pages add build-stats.csv build-stats-big-merge.csv build-stats-bootstrap.csv
main/scripts/get-build-stats.py --copr-projectname llvm-snapshots-pgo-`date '+%Y%m%d'` | tee -a gh-pages/build-stats-pgo.csv
git -C gh-pages add build-stats.csv build-stats-big-merge.csv build-stats-pgo.csv
fi
if ${{ env.create_diagrams }}; then
main/scripts/create-diagrams.py --datafile gh-pages/build-stats.csv --datafile-big-merge gh-pages/build-stats-big-merge.csv --datafile-bootstrap gh-pages/build-stats-bootstrap.csv
main/scripts/create-diagrams.py --datafile gh-pages/build-stats.csv --datafile-big-merge gh-pages/build-stats-big-merge.csv --datafile-pgo gh-pages/build-stats-pgo.csv
mv index.html gh-pages/index.html
mv fig-*.html gh-pages/
git -C gh-pages add index.html fig-*.html
Expand Down
24 changes: 15 additions & 9 deletions scripts/create-diagrams.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,11 +295,11 @@ def main() -> None:
help="path to your build-stats-big-merge.csv file",
)
parser.add_argument(
"--datafile-bootstrap",
dest="datafile_bootstrap",
"--datafile-pgo",
dest="datafile_pgo",
type=str,
default="build-stats-bootstrap.csv",
help="path to your build-stats-bootstrap.csv file",
default="build-stats-pgo.csv",
help="path to your build-stats-pgo.csv file",
)
args = parser.parse_args()

Expand Down Expand Up @@ -344,16 +344,16 @@ def main() -> None:
df_big_merge.build_id = df_big_merge.build_id.apply(lambda x: [x])

# Create dataframe of llvm, clang, compiler-rt and libomp but when build in
# bootstrap mode. The chroots are prefixed with "bootstrap-" on the fly to
# pgo mode. The chroots are prefixed with "pgo-" on the fly to
# be able to distinguish the two cases.
df_bootstrap = prepare_data(filepath=args.datafile_bootstrap)
df_bootstrap["chroot"] = "bootstrap-" + df_bootstrap["chroot"]
df_pgo = prepare_data(filepath=args.datafile_pgo)
df_pgo["chroot"] = "pgo-" + df_pgo["chroot"]
# Convert build_id column with int64's in it to an array of int64's to match
# that of the combined standalone dataframe above (see: df_combined).
df_bootstrap.build_id = df_bootstrap.build_id.apply(lambda x: [x])
df_pgo.build_id = df_pgo.build_id.apply(lambda x: [x])

# Concat the three dataframes of combined standalone and big-merge
df_result = pd.concat([df_combined, df_big_merge, df_bootstrap])
df_result = pd.concat([df_combined, df_big_merge, df_pgo])

fig = create_figure(df=df_result)
filepath = "fig-combined-standalone.html"
Expand All @@ -366,6 +366,12 @@ def main() -> None:
save_figure(fig=fig, filepath=filepath)
add_html_header_menu(filepath=filepath, all_packages=all_packages)

# Create dedicated big-merge figure with nothing else in it.
fig = create_figure(df=df_pgo)
filepath = "fig-pgo.html"
save_figure(fig=fig, filepath=filepath)
add_html_header_menu(filepath=filepath, all_packages=all_packages)

# Create an index HTML overview page that links to each figure page
create_index_page(all_packages=all_packages, filepath="index.html")

Expand Down

0 comments on commit b1c1cdc

Please sign in to comment.