Lines Matching refs:stats

284         // graceful shutdown system, which should trigger persist of stats, and
312 // after systemReady(), we should have historical stats loaded again
372 // verify identical stats, but spread across 4 buckets now
507 // now pretend two UIDs are uninstalled, which should migrate stats to
658 NetworkStats stats = mSession.getSummaryForAllUid(
660 assertEquals(3, stats.size());
661 assertValues(stats, IFACE_ALL, UID_RED, SET_DEFAULT, TAG_NONE, 50L, 5L, 50L, 5L, 1);
662 assertValues(stats, IFACE_ALL, UID_RED, SET_DEFAULT, 0xF00D, 10L, 1L, 10L, 1L, 1);
663 assertValues(stats, IFACE_ALL, UID_BLUE, SET_DEFAULT, TAG_NONE, 2048L, 16L, 1024L, 8L, 0);
667 stats = mSession.getSummaryForAllUid(
669 assertEquals(1, stats.size());
670 assertValues(stats, IFACE_ALL, UID_BLUE, SET_DEFAULT, TAG_NONE, 1024L, 8L, 512L, 4L, 0);
729 final NetworkStats stats = mSession.getSummaryForAllUid(
731 assertEquals(4, stats.size());
732 assertValues(stats, IFACE_ALL, UID_RED, SET_DEFAULT, TAG_NONE, 128L, 2L, 128L, 2L, 1);
733 assertValues(stats, IFACE_ALL, UID_RED, SET_DEFAULT, 0xF00D, 64L, 1L, 64L, 1L, 1);
734 assertValues(stats, IFACE_ALL, UID_RED, SET_FOREGROUND, TAG_NONE, 32L, 2L, 32L, 2L, 1);
735 assertValues(stats, IFACE_ALL, UID_RED, SET_FOREGROUND, 0xFAAD, 1L, 1L, 1L, 1L, 1);
852 final NetworkStats stats = mSession.getSummaryForNetwork(template, start, end);
853 assertValues(stats, IFACE_ALL, UID_ALL, SET_DEFAULT, TAG_NONE, rxBytes, rxPackets, txBytes,
871 final NetworkStats stats = mSession.getSummaryForAllUid(
873 assertValues(stats, IFACE_ALL, uid, set, TAG_NONE, rxBytes, rxPackets, txBytes, txPackets,
972 private static void assertValues(NetworkStats stats, String iface, int uid, int set,
976 final int i = stats.findIndex(iface, uid, SET_DEFAULT, tag);
978 entry.add(stats.getValues(i, null));
982 final int i = stats.findIndex(iface, uid, SET_FOREGROUND, tag);
984 entry.add(stats.getValues(i, null));
995 private static void assertValues(NetworkStatsHistory stats, long start, long end, long rxBytes,
997 final NetworkStatsHistory.Entry entry = stats.getValues(start, end, null);