| 442 | } |
| 443 | |
| 444 | void cmInstrumentation::InsertDynamicSystemInformation( |
| 445 | Json::Value& root, std::string const& prefix) |
| 446 | { |
| 447 | Json::Value data; |
| 448 | double memory; |
| 449 | double load; |
| 450 | this->GetDynamicSystemInformation(memory, load); |
| 451 | if (!root.isMember("dynamicSystemInformation")) { |
| 452 | root["dynamicSystemInformation"] = Json::objectValue; |
| 453 | } |
| 454 | root["dynamicSystemInformation"][cmStrCat(prefix, "HostMemoryUsed")] = |
| 455 | memory; |
| 456 | root["dynamicSystemInformation"][cmStrCat(prefix, "CPULoadAverage")] = |
| 457 | load > 0 ? Json::Value(load) : Json::nullValue; |
| 458 | } |
| 459 | |
| 460 | void cmInstrumentation::GetDynamicSystemInformation(double& memory, |
| 461 | double& load) |
no test coverage detected