Skip to content

Commit

Permalink
Small change in TrafficStats defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickfav committed Oct 19, 2017
1 parent ab0ff91 commit 82f37ba
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -664,18 +664,17 @@ private static List<PageEntry<?>> createFromEntrySet(Set<? extends Map.Entry<?,
public static Section.HeaderSection createTransferStatSection(int... uids) {
Section.ModifiableHeaderSection section = Hood.ext().createSection("Traffic Stats");

section.add(Hood.get().createPropertyEntry("thread tag", TrafficStats.getThreadStatsTag()));
section.add(createTxRxdSection("Mobile", TrafficStats.getMobileTxBytes(), TrafficStats.getMobileTxPackets(),
TrafficStats.getMobileRxBytes(), TrafficStats.getMobileRxPackets()));
section.add(createTxRxdSection("Total", TrafficStats.getTotalTxBytes(), TrafficStats.getTotalTxPackets(),
TrafficStats.getTotalRxBytes(), TrafficStats.getTotalRxPackets()));

if (uids != null) {
for (int uid : uids) {
section.add(createTxRxdSection("Socket " + uid, TrafficStats.getUidTxBytes(uid), TrafficStats.getUidTxPackets(uid),
TrafficStats.getUidRxBytes(uid), TrafficStats.getUidRxPackets(uid)));
}
}
section.add(createTxRxdSection("Mobile", TrafficStats.getMobileTxBytes(), TrafficStats.getMobileTxPackets(),
TrafficStats.getMobileRxBytes(), TrafficStats.getMobileRxPackets()));
section.add(createTxRxdSection("Total", TrafficStats.getTotalTxBytes(), TrafficStats.getTotalTxPackets(),
TrafficStats.getTotalRxBytes(), TrafficStats.getTotalRxPackets()));

return section;
}

Expand Down

0 comments on commit 82f37ba

Please sign in to comment.