Skip to content

Commit

Permalink
Add build bloat readme
Browse files Browse the repository at this point in the history
  • Loading branch information
maximyurchuk committed Jun 6, 2024
1 parent c7be641 commit ee491aa
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions ydb/ci/build_bloat/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Build bloat

A tool used to visualize clang's compilation profiles.

![screenshot](screenshot.png)

It helps to answer the following questions:
- which dirs/files has longest impact on build time
- which headers has longest impact on build time

## How to use

You have to generate compilation profiles using `-ftime-trace` as compilation flag.

With `ya` tool it can be done with folowing comand:

`ya make <your usual arguments> --output=~/some_output_build_dir -DCOMPILER_TIME_TRACE --add-result=.json`

After build is done run:

`ya tool python3 main.py --build-dir ~/some_output_build_dir --html-dir-cpp html_cpp_impact --html-dir-headers html_headers_impact`

And open `html_cpp_impact/index.html`, `html_headers_impact/index.html`
Binary file added ydb/ci/build_bloat/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ee491aa

Please sign in to comment.