Merge "Add packet counts to uid and iface stats. Needed to add Ethernet overhead to uid_stats (IP level) to compare with interface stats (Ethernet level)."
This commit is contained in:
committed by
Android (Google) Code Review
commit
2e4a560f29
@@ -142,5 +142,5 @@ option java_package com.android.server
|
||||
# ---------------------------
|
||||
# NetworkStatsService.java
|
||||
# ---------------------------
|
||||
51100 netstats_mobile_sample (iface_rx|2|2),(iface_tx|2|2),(uid_rx|2|2),(uid_tx|2|2)
|
||||
51101 netstats_wifi_sample (iface_rx|2|2),(iface_tx|2|2),(uid_rx|2|2),(uid_tx|2|2)
|
||||
51100 netstats_mobile_sample (iface_rx_bytes|2|2),(iface_tx_bytes|2|2),(iface_rx_pkts|2|1),(iface_tx_pkts|2|1),(uid_rx_bytes|2|2),(uid_tx_bytes|2|2),(uid_rx_pkts|2|1),(uid_tx_pkts|2|1)
|
||||
51101 netstats_wifi_sample (iface_rx_bytes|2|2),(iface_tx_bytes|2|2),(iface_rx_pkts|2|1),(iface_tx_pkts|2|1),(uid_rx_bytes|2|2),(uid_tx_bytes|2|2),(uid_rx_pkts|2|1),(uid_tx_pkts|2|1)
|
||||
|
||||
@@ -865,14 +865,20 @@ public class NetworkStatsService extends INetworkStatsService.Stub {
|
||||
ifaceTotal = getSummaryForNetwork(template, start, end).getTotal(ifaceTotal);
|
||||
uidTotal = getSummaryForAllUid(template, start, end, false).getTotal(uidTotal);
|
||||
EventLogTags.writeNetstatsMobileSample(
|
||||
ifaceTotal.rxBytes, ifaceTotal.txBytes, uidTotal.rxBytes, uidTotal.txBytes);
|
||||
ifaceTotal.rxBytes, ifaceTotal.txBytes,
|
||||
ifaceTotal.rxPackets, ifaceTotal.txPackets,
|
||||
uidTotal.rxBytes, uidTotal.txBytes,
|
||||
uidTotal.rxPackets, uidTotal.txPackets);
|
||||
|
||||
// collect wifi sample
|
||||
template = buildTemplateWifi();
|
||||
ifaceTotal = getSummaryForNetwork(template, start, end).getTotal(ifaceTotal);
|
||||
uidTotal = getSummaryForAllUid(template, start, end, false).getTotal(uidTotal);
|
||||
EventLogTags.writeNetstatsWifiSample(
|
||||
ifaceTotal.rxBytes, ifaceTotal.txBytes, uidTotal.rxBytes, uidTotal.txBytes);
|
||||
ifaceTotal.rxBytes, ifaceTotal.txBytes,
|
||||
ifaceTotal.rxPackets, ifaceTotal.txPackets,
|
||||
uidTotal.rxBytes, uidTotal.txBytes,
|
||||
uidTotal.rxPackets, uidTotal.txPackets);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user