Changeset 29960 in vbox for trunk/src/VBox/Main
- Timestamp:
- Jun 1, 2010 3:43:59 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/webservice/webtest.cpp
r29200 r29960 49 49 " - webtest version <vboxref>: IVirtualBox::getVersion().\n" 50 50 " - webtest gethost <vboxref>: IVirtualBox::getHost().\n" 51 " - webtest getpc <vboxref>: IVirtualBox::getPerformanceCollector().\n" 51 52 " - webtest getmachines <vboxref>: IVirtualBox::getMachines().\n" 52 53 " - webtest createmachine <vboxref> <baseFolder> <name>: IVirtualBox::createMachine().\n" … … 61 62 " - webtest getostype <machineref>: IMachine::getGuestOSType().\n" 62 63 " - webtest savesettings <machineref>: IMachine::saveSettings().\n" 64 " - IPerformanceCollector:\n" 65 " - webtest setupmetrics <pcref>: IPerformanceCollector::setupMetrics()\n" 66 " - webtest querymetricsdata <pcref>: IPerformanceCollector::QueryMetricsData()\n" 63 67 " - All managed object references:\n" 64 68 " - webtest getif <ref>: report interface of object.\n" … … 164 168 { 165 169 std::cout << "Host objref " << resp.returnval << "\n"; 170 } 171 } 172 } 173 else if (!strcmp(pcszMode, "getpc")) 174 { 175 if (argc < 3) 176 std::cout << "Not enough arguments for \"" << pcszMode << "\" mode.\n"; 177 else 178 { 179 _vbox__IVirtualBox_USCOREgetPerformanceCollector req; 180 req._USCOREthis = argv[2]; 181 _vbox__IVirtualBox_USCOREgetPerformanceCollectorResponse resp; 182 183 if (!(soaprc = soap_call___vbox__IVirtualBox_USCOREgetPerformanceCollector(&soap, 184 pcszArgEndpoint, 185 NULL, 186 &req, 187 &resp))) 188 { 189 std::cout << "Performance collector objref " << resp.returnval << "\n"; 166 190 } 167 191 } … … 325 349 } 326 350 } 351 else if (!strcmp(pcszMode, "setupmetrics")) 352 { 353 if (argc < 3) 354 std::cout << "Not enough arguments for \"" << pcszMode << "\" mode.\n"; 355 else 356 { 357 _vbox__IPerformanceCollector_USCOREsetupMetrics req; 358 req._USCOREthis = argv[2]; 359 // req.metricNames[0] = "*"; 360 // req.objects 361 req.period = 1; // seconds 362 req.count = 100; 363 _vbox__IPerformanceCollector_USCOREsetupMetricsResponse resp; 364 if (!(soaprc = soap_call___vbox__IPerformanceCollector_USCOREsetupMetrics(&soap, 365 pcszArgEndpoint, 366 NULL, 367 &req, 368 &resp))) 369 { 370 size_t c = resp.returnval.size(); 371 for (size_t i = 0; 372 i < c; 373 ++i) 374 { 375 std::cout << "Metric " << i << ": objref " << resp.returnval[i] << "\n"; 376 } 377 } 378 } 379 } 380 else if (!strcmp(pcszMode, "querymetricsdata")) 381 { 382 if (argc < 3) 383 std::cout << "Not enough arguments for \"" << pcszMode << "\" mode.\n"; 384 else 385 { 386 _vbox__IPerformanceCollector_USCOREqueryMetricsData req; 387 req._USCOREthis = argv[2]; 388 // req.metricNames[0] = "*"; 389 // req.objects 390 _vbox__IPerformanceCollector_USCOREqueryMetricsDataResponse resp; 391 if (!(soaprc = soap_call___vbox__IPerformanceCollector_USCOREqueryMetricsData(&soap, 392 pcszArgEndpoint, 393 NULL, 394 &req, 395 &resp))) 396 { 397 size_t c = resp.returnval.size(); 398 for (size_t i = 0; 399 i < c; 400 ++i) 401 { 402 std::cout << "long " << i << ": " << resp.returnval[i] << "\n"; 403 } 404 } 405 } 406 } 327 407 else if (!strcmp(pcszMode, "release")) 328 408 {
Note:
See TracChangeset
for help on using the changeset viewer.