| 231 | } |
| 232 | |
| 233 | static void printObjectInfo(const printInfoStruct& pI) |
| 234 | { |
| 235 | if (pI.wsFullPath.empty()) { |
| 236 | std::wcout << "No object given!\n"; |
| 237 | return; |
| 238 | } |
| 239 | |
| 240 | std::vector<std::wstring> vecInstances, vecCounters; |
| 241 | |
| 242 | if (!getInstancesAndCountersOfObject(pI.wsFullPath, vecInstances, vecCounters)) { |
| 243 | std::wcout << "Could not enumerate instances and counters of " << pI.wsFullPath << '\n' |
| 244 | << "Make sure it exists!\n"; |
| 245 | return; |
| 246 | } |
| 247 | |
| 248 | std::wcout << "Instances of " << pI.wsFullPath << ":\n"; |
| 249 | if (vecInstances.empty()) |
| 250 | std::wcout << "> Has no instances\n"; |
| 251 | else { |
| 252 | for (const auto& instance : vecInstances) |
| 253 | std::wcout << "> " << instance << '\n'; |
| 254 | } |
| 255 | std::wcout << std::endl; |
| 256 | |
| 257 | std::wcout << "Performance Counters of " << pI.wsFullPath << ":\n"; |
| 258 | if (vecCounters.empty()) |
| 259 | std::wcout << "> Has no counters\n"; |
| 260 | else { |
| 261 | for (const auto& counter : vecCounters) |
| 262 | std::wcout << "> " << counter << "\n"; |
| 263 | } |
| 264 | std::wcout << std::endl; |
| 265 | } |
| 266 | |
| 267 | bool QueryPerfData(printInfoStruct& pI) |
| 268 | { |
no test coverage detected