Conversation
Fix missing EOF at end of containers/install_sys.sh
ednolan
left a comment
There was a problem hiding this comment.
I'd prefer to have the following changes made before we merge this in:
-
Because we vendor infra/, including docs/tracing_example.png means we automatically add half a megabyte to the size of all beman repositories; not to mention that if we change the image, the git history needs to include both of them. I don't think we need the image for users to understand what this does.
-
The word "telemetry" can have a connotation, not intended here, of software that collects some information and then "phones home," like Firefox telemetry. I'd rather call this "BuildProfiling" or "BuildTimeProfiling" or "BuildPerformanceProfiling" than "BuildTelemetry".
-
Ever since bemanproject/exemplar@df40a6d, we've been bringing in beman_install_library via a direct
include()of the vendored file, rather than withfind_package()and-DCMAKE_PROJECT_TOP_LEVEL_INCLUDES. As such, I think we should removeBuildTelemetry.cmakeand adjust the documentation ininfrato say:include(infra/cmake/BuildTelemetryConfig.cmake) configure_build_telemetry()
rather than
find_package(BuildTelemetry) configure_build_telemetry()
I'm aware that
find_packageis more of a CMake best practice, but I'm of the opinion that maybe we can transition to using it over directincludesif we convertinfrato a proper package-managed package rather than a vendored directory, and as long as it's vendored it doesn't make sense to impose the burden of adding-DCMAKE_PROJECT_TOP_LEVEL_INCLUDES; also, it shouldn't be inconsistent withbeman-install-library.cmake.I know that this kills the ability to toggle enabling/disabling telemetry by choosing whether to specify the
-DCMAKE_PROJECT_TOP_LEVEL_INCLUDES, but since Beman is a project where all the libraries are based on a project template, and we can now bring them all up to date with the latest copy of that template, there's no reason not to just have every library have a call toconfigure_build_telemetry()in its top level CMakeLists.txt.
Other than those items, looks good.
I've explained this to a few hundred people in the last couple months. Most of them needed pictures. But, I agree, thinking about it, they don't all need the picture in repo. Maybe stash it in a wiki here, or in bemanproject/beman or somewhere else.
Naming is hard, and instrumentation also has a bunch of issues. Telemetry is one of the actual use cases for the ~15K CMake projects I'm applying this to now. Although I don't expect it to change much, I'd like to not have to have this fork drift too far from what I've got going into production to monitor integration build perfomance.
We can doc this either way, but as an actual external reused module is how it is being rolled out. Vendoring in and modifying many many packages was a non-starter. The two mechanisms are entirely equivalent.
You can have both. The include(infra/cmake/BuildTelemetry.cmake)or find_package(BuiltTelemetry)or -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=BuildTelemetry.cmakeall do the same thing, and compose to make sure they are only done once in any case. Tests are there to check that instrumentation does not get enabled twice.
Good news/Bad news -- I've started using infra outside Beman? https://github.com/steve-downey/example and https://github.com/steve-downey/surround where
|
Add tools for configuring and using the cmake_instrumentation available as an experimental feature in CMake 4.2. https://cmake.org/cmake/help/latest/command/cmake_instrumentation.html This module sets the CMAKE_EXPERIMENTAL_INSTRUMENTATION gate with the GUID for CMake 4.2. It sets a single callback script and processes all current HOOKs copying the Google Trace format json files to a known location for further processing.
lint Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
lint Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
reformat Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Improve the diagnostic messages for different versions of CMake. Remove the min required call.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
|
Rebased on |
Configuration and callback scripts for using
cmake_instrumentation.