diff --git a/Help/manual/cmake-instrumentation.7.rst b/Help/manual/cmake-instrumentation.7.rst index a551212375..252a5235ba 100644 --- a/Help/manual/cmake-instrumentation.7.rst +++ b/Help/manual/cmake-instrumentation.7.rst @@ -410,13 +410,15 @@ and contain the following data: The Host Memory Used in KiB at ``timeStart``. ``afterHostMemoryUsed`` - The Host Memory Used in KiB at ``timeStop``. + The Host Memory Used in KiB at ``timeStart + duration``. ``beforeCPULoadAverage`` - The Average CPU Load at ``timeStart``. + The Average CPU Load at ``timeStart``, or ``null`` if it cannot be + determined. ``afterCPULoadAverage`` - The Average CPU Load at ``timeStop``. + The Average CPU Load at ``timeStart + duration``, or ``null`` if it cannot + be determined. ``configureContent`` The path to a :ref:`cmake_instrumentation Configure Content` file located diff --git a/Source/cmInstrumentation.cxx b/Source/cmInstrumentation.cxx index edc1c30eb3..6b635000d2 100644 --- a/Source/cmInstrumentation.cxx +++ b/Source/cmInstrumentation.cxx @@ -416,7 +416,8 @@ void cmInstrumentation::InsertDynamicSystemInformation( } root["dynamicSystemInformation"][cmStrCat(prefix, "HostMemoryUsed")] = memory; - root["dynamicSystemInformation"][cmStrCat(prefix, "CPULoadAverage")] = load; + root["dynamicSystemInformation"][cmStrCat(prefix, "CPULoadAverage")] = + load > 0 ? Json::Value(load) : Json::nullValue; } void cmInstrumentation::GetDynamicSystemInformation(double& memory,