Skip to content

Commit

Permalink
Added instructions for time-trace profiling and plotting
Browse files Browse the repository at this point in the history
  • Loading branch information
JPenuchot committed Dec 5, 2022
1 parent 6497481 commit b7d96b5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,16 @@ int sum() {
}
```
By default, only compiler execution time is measured.
If you want to generate plots using Clang's builtin profiler, add the following:
```cmake
add_compile_options(-ftime-trace -ftime-trace-granularity=1)
```

Note that plotting profiler data takes more time
and will generate a *lot* of plot files.

Then you can declare a benchmark case target in CMake with the following:

```cmake
Expand Down

0 comments on commit b7d96b5

Please sign in to comment.