Changeset 43933 in vbox for trunk/src/VBox/Main/src-server
- Timestamp:
- Nov 22, 2012 7:43:47 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/HostNetworkInterfaceImpl.cpp
r43629 r43933 93 93 pm::CollectorHAL *hal = aCollector->getHAL(); 94 94 /* Create sub metrics */ 95 Utf8StrFmt strName("Net/%ls /Load", mShortName.raw());96 pm::SubMetric *networkLoadRx = new pm::SubMetric(strName + "/ Rx",95 Utf8StrFmt strName("Net/%ls", mShortName.raw()); 96 pm::SubMetric *networkLoadRx = new pm::SubMetric(strName + "/Load/Rx", 97 97 "Percentage of network interface receive bandwidth used."); 98 pm::SubMetric *networkLoadTx = new pm::SubMetric(strName + "/ Tx",98 pm::SubMetric *networkLoadTx = new pm::SubMetric(strName + "/Load/Tx", 99 99 "Percentage of network interface transmit bandwidth used."); 100 pm::SubMetric *networkLinkSpeed = new pm::SubMetric(strName + "/LinkSpeed", 101 "Physical link speed."); 100 102 101 103 /* Create and register base metrics */ 102 pm::BaseMetric *networkLoad = new pm::HostNetworkLoadRaw(hal, objptr, strName, Utf8Str(mShortName), Utf8Str(mInterfaceName), m.speedMbits, networkLoadRx, networkLoadTx); 104 pm::BaseMetric *networkSpeed = new pm::HostNetworkSpeed(hal, objptr, strName + "/LinkSpeed", Utf8Str(mShortName), Utf8Str(mInterfaceName), m.speedMbits, networkLinkSpeed); 105 aCollector->registerBaseMetric(networkSpeed); 106 pm::BaseMetric *networkLoad = new pm::HostNetworkLoadRaw(hal, objptr, strName + "/Load", Utf8Str(mShortName), Utf8Str(mInterfaceName), m.speedMbits, networkLoadRx, networkLoadTx); 103 107 aCollector->registerBaseMetric(networkLoad); 108 109 aCollector->registerMetric(new pm::Metric(networkSpeed, networkLinkSpeed, 0)); 110 aCollector->registerMetric(new pm::Metric(networkSpeed, networkLinkSpeed, 111 new pm::AggregateAvg())); 112 aCollector->registerMetric(new pm::Metric(networkSpeed, networkLinkSpeed, 113 new pm::AggregateMin())); 114 aCollector->registerMetric(new pm::Metric(networkSpeed, networkLinkSpeed, 115 new pm::AggregateMax())); 104 116 105 117 aCollector->registerMetric(new pm::Metric(networkLoad, networkLoadRx, 0)); … … 124 136 LogFlowThisFunc(("mShortName={%ls}, mInterfaceName={%ls}, mGuid={%s}\n", 125 137 mShortName.raw(), mInterfaceName.raw(), mGuid.toString().c_str())); 126 Utf8StrFmt name("Net/%ls /Load", mShortName.raw());138 Utf8StrFmt name("Net/%ls", mShortName.raw()); 127 139 aCollector->unregisterMetricsFor(objptr, name + "/*"); 128 140 aCollector->unregisterBaseMetricsFor(objptr, name);
Note:
See TracChangeset
for help on using the changeset viewer.