hanchenye-llvm-project/clang-tools-extra/docs
Roman Lebedev a87f1d04ce [clang-tidy] Store checks profiling info as JSON files
Summary:
Continuation of D46504.

Example output:
```
  $ clang-tidy -enable-check-profile -store-check-profile=. -checks=-*,readability-function-size source.cpp
  $ # Note that there won't be timings table printed to the console.
  $ cat *.json
  {
  "file": "/path/to/source.cpp",
  "timestamp": "2018-05-16 16:13:18.717446360",
  "profile": {
    "time.clang-tidy.readability-function-size.wall": 1.0421266555786133e+00,
    "time.clang-tidy.readability-function-size.user": 9.2088400000005421e-01,
    "time.clang-tidy.readability-function-size.sys": 1.2418899999999974e-01
  }
  }
```

There are two arguments that control profile storage:

* `-store-check-profile=<prefix>`

  By default reports are printed in tabulated format to stderr. When this option
  is passed, these per-TU profiles are instead stored as JSON.
  If the prefix is not an absolute path, it is considered to be relative to the
  directory from where you have run :program:`clang-tidy`. All `.` and `..`
  patterns in the path are collapsed, and symlinks are resolved.

  Example:
  Let's suppose you have a source file named `example.cpp`, located in
  `/source` directory.

  * If you specify `-store-check-profile=/tmp`, then the profile will be saved
    to `/tmp/<timestamp>-example.cpp.json`

  * If you run :program:`clang-tidy` from within `/foo` directory, and specify
    `-store-check-profile=.`, then the profile will still be saved to
    `/foo/<timestamp>-example.cpp.json`

Reviewers: alexfh, sbenza, george.karpenkov, NoQ, aaron.ballman

Reviewed By: alexfh, george.karpenkov, aaron.ballman

Subscribers: Quuxplusone, JonasToth, aaron.ballman, llvm-commits, rja, Eugene.Zelenko, xazax.hun, mgrang, cfe-commits

Tags: #clang-tools-extra

Differential Revision: https://reviews.llvm.org/D46602

llvm-svn: 334101
2018-06-06 15:07:51 +00:00
..
clang-tidy [clang-tidy] Store checks profiling info as JSON files 2018-06-06 15:07:51 +00:00
CMakeLists.txt
Doxyfile
ModularizeUsage.rst
README.txt
ReleaseNotes.rst [clang-tidy] Store checks profiling info as JSON files 2018-06-06 15:07:51 +00:00
clang-doc.rst [docs] Adding clang-doc to CTE toctree to fix docs build error 2018-03-12 21:39:01 +00:00
clang-modernize.rst
clang-rename.rst
clang-tidy.rst
clangd.rst [clangd] Mark "Source Hover" as implemented in the docs 2018-03-29 14:49:21 +00:00
conf.py Docs, release notes: update version to 7.0.0 2018-01-03 15:53:24 +00:00
cpp11-migrate.rst
doxygen-mainpage.dox
doxygen.cfg.in
include-fixer.rst
index.rst [docs] Adding clang-doc to CTE toctree to fix docs build error 2018-03-12 21:39:01 +00:00
make.bat
modularize.rst Fix more inconsistent line endings. NFC. 2017-12-18 19:46:56 +00:00
pp-trace.rst Fix more inconsistent line endings. NFC. 2017-12-18 19:46:56 +00:00

README.txt

-------------------------------------------------------------
Documentation for the tools of clang-tools-extra repo project
-------------------------------------------------------------

Sphinx and doxygen documentation is generated by executing make.

Sphinx html files can be generated separately using make html.

Doxygen html files can also be generated using make doxygen.

The generated documentation will be placed in _build/html.