Merge changes from topic "ifaceStatsDetail" into pi-dev

* changes:
  Remove the unused file parsing function
  Use eBPF map data for per iface stats
This commit is contained in:
android-build-team Robot
2018-05-02 19:17:27 +00:00
committed by Android (Google) Code Review

View File

@@ -115,20 +115,6 @@ public class NetworkStatsFactoryTest {
assertStatsEntry(stats, "rmnet1", 10021, SET_FOREGROUND, 0x30100000, 742L, 3L, 1265L, 3L); assertStatsEntry(stats, "rmnet1", 10021, SET_FOREGROUND, 0x30100000, 742L, 3L, 1265L, 3L);
} }
@Test
public void testNetworkStatsSummary() throws Exception {
stageFile(R.raw.net_dev_typical, file("net/dev"));
final NetworkStats stats = mFactory.readNetworkStatsIfaceDev();
assertEquals(6, stats.size());
assertStatsEntry(stats, "lo", UID_ALL, SET_ALL, TAG_NONE, 8308L, 8308L);
assertStatsEntry(stats, "rmnet0", UID_ALL, SET_ALL, TAG_NONE, 1507570L, 489339L);
assertStatsEntry(stats, "ifb0", UID_ALL, SET_ALL, TAG_NONE, 52454L, 0L);
assertStatsEntry(stats, "ifb1", UID_ALL, SET_ALL, TAG_NONE, 52454L, 0L);
assertStatsEntry(stats, "sit0", UID_ALL, SET_ALL, TAG_NONE, 0L, 0L);
assertStatsEntry(stats, "ip6tnl0", UID_ALL, SET_ALL, TAG_NONE, 0L, 0L);
}
@Test @Test
public void testNetworkStatsSingle() throws Exception { public void testNetworkStatsSingle() throws Exception {
stageFile(R.raw.xt_qtaguid_iface_typical, file("net/xt_qtaguid/iface_stat_all")); stageFile(R.raw.xt_qtaguid_iface_typical, file("net/xt_qtaguid/iface_stat_all"));