Commit Graph

16 Commits

Author SHA1 Message Date
Brad King
deb44bdf73 Merge topic 'instrumentation-snippet-names'
39f365ec3c instrumentation: Unique snippet file names

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !10491
2025-03-19 09:05:56 -04:00
Martin Duffy
39f365ec3c instrumentation: Unique snippet file names
Updates the hash in snippet file naming to take the ProcessId into account
so that snippets with identical commands don't risk a collision in filename.

Additionally, this adds a `workingDir` to snippet files so that snippets with
identical commands can be more easily differentiated, such as with install
snippets.
2025-03-18 13:23:02 -04:00
Brad King
2604f5d8b3 Merge topic 'json-errors-filename'
f134468a98 JSON: Improve JSON error message formatting

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !10463
2025-03-14 12:17:02 -04:00
Martin Duffy
f134468a98 JSON: Improve JSON error message formatting
This improves the output of JSON-related error messages. It adds the filename to
the output and excludes the column number.

This is particularly useful when there are multiple JSON files being read that
could be responsible for an error, ie CMakePresets.json and
CMakeUserPresets.json, or multiple instrumentation queries.

Issue: #26717
2025-03-13 10:44:31 -04:00
Martin Duffy
4e7b37cad3 instrumentation: Quote command arguments to preserve separation
Fixes: #26702
2025-02-24 13:11:19 -05:00
Zack Galbreath
a6d4a9a2ae ctest: Include cmake instrumentation data in XML files 2025-02-15 06:25:12 -05:00
Martin Duffy
2299b2fcab instrumentation: Add build snippet
Adds a new snippet generation for recording the full time spent waiting for
`ninja` or `make` invocations to finish.
2025-02-11 13:31:28 -05:00
Martin Duffy
32e9d27c88 instrumentation: Remove undocumented binaryDir field from snippets
Removes field from snippet files redundant with the index file's "buildDir"
2025-02-10 17:19:10 -05:00
Martin Duffy
9689155a05 instrumentation: Add Config value to snippet data 2025-02-09 12:29:09 -05:00
Martin Duffy
6598248da7 instrumentation: Avoid busy-wait on postBuild hook 2025-02-06 07:46:09 -05:00
Martin Duffy
2680f30caf instrumentation: Allow multiple CALLBACK arguments
Don't require quotes around CALLBACK argument and allow it to be passed
multiple times.
2025-02-04 11:15:20 -05:00
Martin Duffy
fc1d55f6a5 instrumentation: Add preBuild and postBuild hooks for ninja
Allows instrumentation indexing and callbacks to occur at the start or end of
every `ninja` invocation.
2025-02-04 11:15:11 -05:00
Martin Duffy
f62a4ab2ee instrumentation: Refactor cmInstrumentation constructor and usage
Creates a global cmInstrumentation pointer on the CMake Instance to
prevent creating multiple instrumentation objects.
2025-02-03 10:10:06 -05:00
Kitware Robot
0b96ae1f6a Revise C++ coding style using clang-format with "east const"
Run the `clang-format.bash` script to update all our C and C++ code to a
new style defined by `.clang-format`, now with "east const" enforcement.
Use `clang-format` version 18.

* If you reached this commit for a line in `git blame`, re-run the blame
  operation starting at the parent of this commit to see older history
  for the content.

* See the parent commit for instructions to rebase a change across this
  style transition commit.

Issue: #26123
2025-01-23 13:09:50 -05:00
Martin Duffy
9d34069ca8 instrumentation: Add targetLabels field to link snippets
Adds a new data field `targetLabels` to link snippets which contains a list of
text labels from the LABELS target property.
2025-01-17 11:07:30 -05:00
Martin Duffy
097d4fd1b5 instrumentation: Collect and record project build system metrics
Add a feature for collecting build instrumentation for CMake projects.

Issue: #26099
2025-01-15 09:16:50 -05:00