Home
last modified time | relevance | path

Searched refs:NetworkStats (Results 1 – 25 of 53) sorted by relevance

123

/frameworks/base/tests/net/java/android/net/
DNetworkStatsTest.java19 import static android.net.NetworkStats.DEFAULT_NETWORK_ALL;
20 import static android.net.NetworkStats.DEFAULT_NETWORK_NO;
21 import static android.net.NetworkStats.DEFAULT_NETWORK_YES;
22 import static android.net.NetworkStats.INTERFACES_ALL;
23 import static android.net.NetworkStats.METERED_ALL;
24 import static android.net.NetworkStats.METERED_NO;
25 import static android.net.NetworkStats.METERED_YES;
26 import static android.net.NetworkStats.ROAMING_ALL;
27 import static android.net.NetworkStats.ROAMING_NO;
28 import static android.net.NetworkStats.ROAMING_YES;
[all …]
DNetworkStatsHistoryTest.java109 new NetworkStats.Entry(1024L, 10L, 2048L, 20L, 2L)); in testRecordSingleBucket()
123 new NetworkStats.Entry(1024L, 10L, 128L, 2L, 2L)); in testRecordEqualBuckets()
140 new NetworkStats.Entry(1000L, 2000L, 5000L, 10000L, 100L)); in testRecordTouchingBuckets()
160 new NetworkStats.Entry(128L, 2L, 256L, 4L, 1L)); in testRecordGapBuckets()
162 new NetworkStats.Entry(64L, 1L, 512L, 8L, 2L)); in testRecordGapBuckets()
173 new NetworkStats.Entry(2048L, 4L, 2048L, 4L, 2L)); in testRecordGapBuckets()
190 new NetworkStats.Entry(256L, 2L, 256L, 2L, 1L)); in testRecordOverlapBuckets()
193 new NetworkStats.Entry(1024L, 10L, 1024L, 10L, 10L)); in testRecordOverlapBuckets()
331 final NetworkStats.Entry entry = new NetworkStats.Entry(); in testFuzzing()
370 new NetworkStats.Entry(1024L, 10L, 2048L, 20L, 4L)); in testIgnoreFields()
[all …]
/frameworks/base/core/java/com/android/internal/net/
DNetworkStatsFactory.java19 import static android.net.NetworkStats.SET_ALL;
20 import static android.net.NetworkStats.TAG_ALL;
21 import static android.net.NetworkStats.TAG_NONE;
22 import static android.net.NetworkStats.UID_ALL;
26 import android.net.NetworkStats;
93 if (requiredIfaces == NetworkStats.INTERFACES_ALL) { in augmentWithStackedInterfaces()
118 public static void apply464xlatAdjustments(NetworkStats baseTraffic, in apply464xlatAdjustments()
119 NetworkStats stackedTraffic) { in apply464xlatAdjustments()
120 NetworkStats.apply464xlatAdjustments(baseTraffic, stackedTraffic, sStackedIfaces); in apply464xlatAdjustments()
140 public NetworkStats readBpfNetworkStatsDev() throws IOException { in readBpfNetworkStatsDev()
[all …]
/frameworks/base/tests/net/java/com/android/server/net/
DNetworkStatsServiceTest.java24 import static android.net.NetworkStats.DEFAULT_NETWORK_ALL;
25 import static android.net.NetworkStats.DEFAULT_NETWORK_NO;
26 import static android.net.NetworkStats.DEFAULT_NETWORK_YES;
27 import static android.net.NetworkStats.IFACE_ALL;
28 import static android.net.NetworkStats.INTERFACES_ALL;
29 import static android.net.NetworkStats.METERED_ALL;
30 import static android.net.NetworkStats.METERED_NO;
31 import static android.net.NetworkStats.METERED_YES;
32 import static android.net.NetworkStats.ROAMING_ALL;
33 import static android.net.NetworkStats.ROAMING_NO;
[all …]
DNetworkStatsObserversTest.java21 import static android.net.NetworkStats.DEFAULT_NETWORK_NO;
22 import static android.net.NetworkStats.DEFAULT_NETWORK_YES;
23 import static android.net.NetworkStats.METERED_NO;
24 import static android.net.NetworkStats.ROAMING_NO;
25 import static android.net.NetworkStats.SET_DEFAULT;
26 import static android.net.NetworkStats.TAG_NONE;
45 import android.net.NetworkStats;
253 NetworkStats xtSnapshot = new NetworkStats(TEST_START, 1 /* initialSize */) in testUpdateStats_initialSample_doesNotNotify()
255 NetworkStats uidSnapshot = null; in testUpdateStats_initialSample_doesNotNotify()
278 NetworkStats xtSnapshot = new NetworkStats(TEST_START, 1 /* initialSize */) in testUpdateStats_belowThreshold_doesNotNotify()
[all …]
DNetworkStatsCollectionTest.java20 import static android.net.NetworkStats.SET_ALL;
21 import static android.net.NetworkStats.SET_DEFAULT;
22 import static android.net.NetworkStats.TAG_NONE;
23 import static android.net.NetworkStats.UID_ALL;
38 import android.net.NetworkStats;
197 final NetworkStats.Entry entry = new NetworkStats.Entry(); in testStartEndAtomicBuckets()
210 final NetworkStats.Entry entry = new NetworkStats.Entry(); in testAccessLevels()
470 new NetworkStats.Entry(12_730_893_164L, 1, 0, 0, 0)); in testAugmentPlanGigantic()
551 final NetworkStats.Entry actual = collection.getSummary( in assertSummaryTotal()
559 final NetworkStats.Entry actual = collection.getSummary( in assertSummaryTotalIncludingTags()
[all …]
/frameworks/base/core/java/android/app/usage/
DNetworkStats.java39 public final class NetworkStats implements AutoCloseable { class
68 private int mTag = android.net.NetworkStats.TAG_NONE;
85 private android.net.NetworkStats mSummary = null;
100 private android.net.NetworkStats.Entry mRecycledSummaryEntry = null;
104 NetworkStats(Context context, NetworkTemplate template, int flags, long startTimestamp, in NetworkStats() method in NetworkStats
161 public static final int UID_ALL = android.net.NetworkStats.UID_ALL;
266 public static final int TAG_NONE = android.net.NetworkStats.TAG_NONE;
283 case STATE_ALL: return android.net.NetworkStats.SET_ALL; in convertSet()
284 case STATE_DEFAULT: return android.net.NetworkStats.SET_DEFAULT; in convertSet()
285 case STATE_FOREGROUND: return android.net.NetworkStats.SET_FOREGROUND; in convertSet()
[all …]
DNetworkStatsManager.java24 import android.app.usage.NetworkStats.Bucket;
169 NetworkStats stats = new NetworkStats(mContext, template, mFlags, startTime, endTime, in querySummaryForDevice()
242 NetworkStats stats; in querySummaryForUser()
243 stats = new NetworkStats(mContext, template, mFlags, startTime, endTime, mService); in querySummaryForUser()
269 public NetworkStats querySummary(int networkType, String subscriberId, long startTime, in querySummary()
279 NetworkStats result; in querySummary()
280 result = new NetworkStats(mContext, template, mFlags, startTime, endTime, mService); in querySummary()
291 public NetworkStats queryDetailsForUid(int networkType, String subscriberId, in queryDetailsForUid()
294 NetworkStats.Bucket.TAG_NONE, NetworkStats.Bucket.STATE_ALL); in queryDetailsForUid()
302 public NetworkStats queryDetailsForUidTag(int networkType, String subscriberId, in queryDetailsForUidTag()
[all …]
/frameworks/base/tests/net/java/android/app/usage/
DNetworkStatsManagerTest.java37 import android.net.NetworkStats.Entry;
80 android.net.NetworkStats.SET_DEFAULT, android.net.NetworkStats.TAG_NONE, in testQueryDetails()
85 android.net.NetworkStats.SET_DEFAULT, android.net.NetworkStats.TAG_NONE, in testQueryDetails()
89 android.net.NetworkStats.SET_DEFAULT, android.net.NetworkStats.TAG_NONE, in testQueryDetails()
94 android.net.NetworkStats.SET_DEFAULT, android.net.NetworkStats.TAG_NONE, in testQueryDetails()
110 eq(uid1), eq(android.net.NetworkStats.SET_ALL), in testQueryDetails()
111 eq(android.net.NetworkStats.TAG_NONE), in testQueryDetails()
121 eq(uid2), eq(android.net.NetworkStats.SET_ALL), in testQueryDetails()
122 eq(android.net.NetworkStats.TAG_NONE), in testQueryDetails()
132 NetworkStats stats = mManager.queryDetails( in testQueryDetails()
[all …]
/frameworks/base/core/tests/benchmarks/src/android/net/
DNetworkStatsBenchmark.java29 private NetworkStats mNetworkStats;
33 mNetworkStats = new NetworkStats(0, mSize + 2); in setUp()
35 NetworkStats.Entry recycle = new NetworkStats.Entry(); in setUp()
40 recycle.tag = NetworkStats.TAG_NONE; in setUp()
53 recycle.set = NetworkStats.SET_FOREGROUND; in setUp()
54 recycle.tag = NetworkStats.TAG_NONE; in setUp()
65 NetworkStats stats = mNetworkStats.clone(); in timeMigrateTun()
77 NetworkStats stats = mNetworkStats.clone(); in timeClone()
/frameworks/base/core/tests/bandwidthtests/src/com/android/bandwidthtest/
DBandwidthTest.java22 import android.net.NetworkStats;
23 import android.net.NetworkStats.Entry;
112 NetworkStats pre_test_stats = fetchDataFromProc(mUid); in downloadFile()
120 NetworkStats prof_stats = TrafficStats.stopDataProfiling(mContext); in downloadFile()
123 NetworkStats post_test_stats = fetchDataFromProc(mUid); in downloadFile()
124 NetworkStats proc_stats = post_test_stats.subtract(pre_test_stats); in downloadFile()
172 NetworkStats pre_test_stats = fetchDataFromProc(mUid); in uploadFile()
175 NetworkStats prof_stats = TrafficStats.stopDataProfiling(mContext); in uploadFile()
177 NetworkStats post_test_stats = fetchDataFromProc(mUid); in uploadFile()
178 NetworkStats proc_stats = post_test_stats.subtract(pre_test_stats); in uploadFile()
[all …]
/frameworks/base/tests/net/java/com/android/internal/net/
DNetworkStatsFactoryTest.java19 import static android.net.NetworkStats.DEFAULT_NETWORK_NO;
20 import static android.net.NetworkStats.METERED_NO;
21 import static android.net.NetworkStats.ROAMING_NO;
22 import static android.net.NetworkStats.SET_ALL;
23 import static android.net.NetworkStats.SET_DEFAULT;
24 import static android.net.NetworkStats.SET_FOREGROUND;
25 import static android.net.NetworkStats.TAG_NONE;
26 import static android.net.NetworkStats.UID_ALL;
32 import android.net.NetworkStats;
84 final NetworkStats stats = parseDetailedStats(R.raw.xt_qtaguid_typical); in testNetworkStatsDetail()
[all …]
/frameworks/base/core/java/android/net/
DNetworkStats.java46 public class NetworkStats implements Parcelable { class
243 public NetworkStats(long elapsedRealtime, int initialSize) { in NetworkStats() method in NetworkStats
266 public NetworkStats(Parcel parcel) { in NetworkStats() method in NetworkStats
304 public NetworkStats clone() { in clone()
305 final NetworkStats clone = new NetworkStats(elapsedRealtime, size); in clone()
306 NetworkStats.Entry entry = null; in clone()
334 public NetworkStats addIfaceValues( in addIfaceValues()
341 public NetworkStats addValues(String iface, int uid, int set, int tag, long rxBytes, in addValues()
348 public NetworkStats addValues(String iface, int uid, int set, int tag, int metered, int roaming, in addValues()
360 public NetworkStats addValues(Entry entry) { in addValues()
[all …]
DINetworkStatsSession.aidl19 import android.net.NetworkStats;
27 NetworkStats getDeviceSummaryForNetwork(in NetworkTemplate template, long start, long end); in getDeviceSummaryForNetwork()
30 NetworkStats getSummaryForNetwork(in NetworkTemplate template, long start, long end); in getSummaryForNetwork()
35NetworkStats getSummaryForAllUid(in NetworkTemplate template, long start, long end, boolean includ… in getSummaryForAllUid()
DNetworkTemplate.java26 import static android.net.NetworkStats.DEFAULT_NETWORK_ALL;
27 import static android.net.NetworkStats.DEFAULT_NETWORK_NO;
28 import static android.net.NetworkStats.DEFAULT_NETWORK_YES;
29 import static android.net.NetworkStats.METERED_ALL;
30 import static android.net.NetworkStats.METERED_NO;
31 import static android.net.NetworkStats.METERED_YES;
32 import static android.net.NetworkStats.ROAMING_ALL;
33 import static android.net.NetworkStats.ROAMING_NO;
34 import static android.net.NetworkStats.ROAMING_YES;
244 builder.append(", metered=").append(NetworkStats.meteredToString(mMetered)); in toString()
[all …]
DINetworkStatsService.aidl22 import android.net.NetworkStats;
43 NetworkStats getDataLayerSnapshotForUid(int uid); in getDataLayerSnapshotForUid()
52 NetworkStats getDetailedUidStats(in String[] requiredIfaces); in getDetailedUidStats()
DITetheringStatsProvider.aidl19 import android.net.NetworkStats;
36 NetworkStats getTetherStats(int how); in getTetherStats()
/frameworks/base/core/tests/benchmarks/src/com/android/internal/net/
DNetworkStatsFactoryBenchmark.java19 import android.net.NetworkStats;
42 NetworkStatsFactory.javaReadNetworkStatsDetail(mStats, NetworkStats.UID_ALL, in timeReadNetworkStatsDetailJava()
51 final NetworkStats stats = new NetworkStats(SystemClock.elapsedRealtime(), 0); in timeReadNetworkStatsDetailNative()
53 stats, mStats.getAbsolutePath(), NetworkStats.UID_ALL, in timeReadNetworkStatsDetailNative()
/frameworks/base/services/core/java/com/android/server/net/
DNetworkStatsService.java28 import static android.net.NetworkStats.DEFAULT_NETWORK_ALL;
29 import static android.net.NetworkStats.IFACE_ALL;
30 import static android.net.NetworkStats.INTERFACES_ALL;
31 import static android.net.NetworkStats.METERED_ALL;
32 import static android.net.NetworkStats.ROAMING_ALL;
33 import static android.net.NetworkStats.SET_ALL;
34 import static android.net.NetworkStats.SET_DEFAULT;
35 import static android.net.NetworkStats.SET_FOREGROUND;
36 import static android.net.NetworkStats.STATS_PER_IFACE;
37 import static android.net.NetworkStats.STATS_PER_UID;
[all …]
DNetworkStatsCollection.java19 import static android.net.NetworkStats.DEFAULT_NETWORK_NO;
20 import static android.net.NetworkStats.DEFAULT_NETWORK_YES;
21 import static android.net.NetworkStats.IFACE_ALL;
22 import static android.net.NetworkStats.METERED_NO;
23 import static android.net.NetworkStats.METERED_YES;
24 import static android.net.NetworkStats.ROAMING_NO;
25 import static android.net.NetworkStats.ROAMING_YES;
26 import static android.net.NetworkStats.SET_ALL;
27 import static android.net.NetworkStats.SET_DEFAULT;
28 import static android.net.NetworkStats.TAG_NONE;
[all …]
DNetworkStatsObservers.java25 import android.net.NetworkStats;
104 public void updateStats(NetworkStats xtSnapshot, NetworkStats uidSnapshot, in updateStats()
366 NetworkStats stats = mCollection.getSummary(template, in getTotalBytesForNetwork()
410 NetworkStats.SET_ALL, NetworkStats.TAG_NONE, in getTotalBytesForNetworkUid()
426 NetworkStats mXtSnapshot;
427 NetworkStats mUidSnapshot;
433 StatsContext(NetworkStats xtSnapshot, NetworkStats uidSnapshot, in StatsContext()
/frameworks/base/core/java/android/os/
DINetworkManagementService.aidl25 import android.net.NetworkStats;
261 NetworkStats getNetworkStatsSummaryDev(); in getNetworkStatsSummaryDev()
262 NetworkStats getNetworkStatsSummaryXt(); in getNetworkStatsSummaryXt()
268 NetworkStats getNetworkStatsDetail(); in getNetworkStatsDetail()
276 NetworkStats getNetworkStatsUidDetail(int uid, in String[] ifaces); in getNetworkStatsUidDetail()
281 NetworkStats getNetworkStatsTethering(int how); in getNetworkStatsTethering()
/frameworks/base/services/core/java/com/android/server/stats/
DStatsCompanionService.java35 import android.net.NetworkStats;
524 int tag, List<StatsLogEventWrapper> ret, NetworkStats stats, boolean withFGBG) { in addNetworkStats()
527 NetworkStats.Entry entry = new NetworkStats.Entry(); // For recycling in addNetworkStats()
547 private NetworkStats rollupNetworkStatsByFGBG(NetworkStats stats) { in rollupNetworkStatsByFGBG()
548 final NetworkStats ret = new NetworkStats(stats.getElapsedRealtime(), 1); in rollupNetworkStatsByFGBG()
550 final NetworkStats.Entry entry = new NetworkStats.Entry(); in rollupNetworkStatsByFGBG()
551 entry.iface = NetworkStats.IFACE_ALL; in rollupNetworkStatsByFGBG()
552 entry.tag = NetworkStats.TAG_NONE; in rollupNetworkStatsByFGBG()
553 entry.metered = NetworkStats.METERED_ALL; in rollupNetworkStatsByFGBG()
554 entry.roaming = NetworkStats.ROAMING_ALL; in rollupNetworkStatsByFGBG()
[all …]
/frameworks/base/tests/DataIdleTest/src/com/android/tests/dataidle/
DDataIdleTest.java21 import android.net.NetworkStats;
22 import android.net.NetworkStats.Entry;
79 final NetworkStats stats = session.getSummaryForAllUid( in fetchStats()
93 void reportStats(NetworkStats stats) { in reportStats()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/net/
DSummaryForAllUidLoader.java22 import android.net.NetworkStats;
27 public class SummaryForAllUidLoader extends AsyncTaskLoader<NetworkStats> {
56 public NetworkStats loadInBackground() { in loadInBackground()

123