VirtualBox

Changeset 6652 in vbox


Ignore:
Timestamp:
Jan 31, 2008 11:49:09 AM (17 years ago)
Author:
vboxsync
Message:

prelimiary network statistics (to be improved)

Location:
trunk/src/VBox
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/DevPCNet.cpp

    r6548 r6652  
    239239    bool                                afAlignment[1];
    240240    uint32_t                            u32LinkSpeed;
     241
     242    STAMCOUNTER                         StatReceiveBytes;
     243    STAMCOUNTER                         StatTransmitBytes;
    241244
    242245#ifdef VBOX_WITH_STATISTICS
     
    17431746                rmd.rmd1.bam  = !CSR_PROM(pData) && is_bcast;
    17441747                rmd.rmd2.mcnt = pkt_size;
     1748
     1749                STAM_REL_COUNTER_ADD(&pData->StatReceiveBytes, pkt_size);
    17451750            }
    17461751            else
     
    17521757                rmd.rmd1.err  = 1;
    17531758            }
     1759
    17541760            /* write back, clear the own bit */
    17551761            pcnetRmdStorePassHost(pData, &rmd, PHYSADDR(pData, crda));
     
    18791885        pData->Led.Asserted.s.fWriting = pData->Led.Actual.s.fWriting = 1;
    18801886    pData->pDrv->pfnSend(pData->pDrv, pData->SendFrame.pvBuf, pData->SendFrame.cb);
     1887    STAM_REL_COUNTER_ADD(&pData->StatTransmitBytes, pData->SendFrame.cb);
    18811888    pData->Led.Actual.s.fWriting = 0;
    18821889    STAM_PROFILE_ADV_STOP(&pData->StatTransmitSend, a);
     
    44914498    PDMDevHlpSTAMRegisterF(pDevIns, &pData->StatTimer,              STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling PCNet Timer",              "/Devices/PCNet%d/Timer", iInstance);
    44924499    PDMDevHlpSTAMRegisterF(pDevIns, &pData->StatReceive,            STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling PCNet receive",            "/Devices/PCNet%d/Receive", iInstance);
     4500#endif
     4501    PDMDevHlpSTAMRegisterF(pDevIns, &pData->StatReceiveBytes,       STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_BYTES,          "Amount of data received",            "/Devices/PCNet%d/ReceiveBytes", iInstance);
     4502#ifdef VBOX_WITH_STATISTICS
    44934503    PDMDevHlpSTAMRegisterF(pDevIns, &pData->StatTransmit,           STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling PCNet transmit in HC",     "/Devices/PCNet%d/Transmit/Total", iInstance);
    4494     PDMDevHlpSTAMRegisterF(pDevIns, &pData->StatTransmitSend,       STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling PCNet send transmit in HC",     "/Devices/PCNet%d/Transmit/Send", iInstance);
     4504#endif
     4505    PDMDevHlpSTAMRegisterF(pDevIns, &pData->StatTransmitBytes,      STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_BYTES,          "Amount of data transmitted",         "/Devices/PCNet%d/TransmitBytes", iInstance);
     4506#ifdef VBOX_WITH_STATISTICS
     4507    PDMDevHlpSTAMRegisterF(pDevIns, &pData->StatTransmitSend,       STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling PCNet send transmit in HC","/Devices/PCNet%d/Transmit/Send", iInstance);
    44954508    PDMDevHlpSTAMRegisterF(pDevIns, &pData->StatTdtePollGC,         STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling PCNet TdtePoll in GC",     "/Devices/PCNet%d/TdtePollGC", iInstance);
    44964509    PDMDevHlpSTAMRegisterF(pDevIns, &pData->StatTdtePollHC,         STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_TICKS_PER_CALL, "Profiling PCNet TdtePoll in HC",     "/Devices/PCNet%d/TdtePollHC", iInstance);
  • trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMInformationDlg.ui.h

    r6630 r6652  
    180180    mNamesMap ["/Devices/ATA1/Unit1/ReadBytes"] = tr ("Amount of data read");
    181181    mNamesMap ["/Devices/ATA1/Unit1/WrittenBytes"] = tr ("Amount of data written");
     182
     183    mNamesMap ["/Devices/PCNet0/TransmitBytes"] = tr ("Amount of bytes transmitted");
     184    mNamesMap ["/Devices/PCNet0/ReceiveBytes"] = tr ("Amount of bytes received");
     185    mNamesMap ["/Devices/PCNet1/TransmitBytes"] = tr ("Amount of bytes transmitted");
     186    mNamesMap ["/Devices/PCNet1/ReceiveBytes"] = tr ("Amount of bytes received");
    182187
    183188    /* Statistics page update. */
     
    426431
    427432    /* Network Adapters Statistics. Counters are currently missed. */
    428     // result += hdrRow.arg ("nw_16px.png").arg (tr ("Dummy Network Adapters Statistics"));
    429     // result += subRow.arg (tr ("Dummy Adapter 1")).arg (tr ("Dummy Adapter 2"));
    430     // result += composeArticle ("B", 6, 7, 14, 15);
     433    result += hdrRow.arg ("nw_16px.png").arg (tr ("Network Adapters Statistics"));
     434    result += subRow.arg (tr ("Adapter 1")).arg (tr ("Adapter 2"));
     435    result += composeArticle ("B", 16, 17, 18, 19);
    431436
    432437    /* Show full composed page. */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette