Home
last modified time | relevance | path

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

12

/frameworks/base/core/tests/coretests/src/android/net/
DNetworkStatsTest.java19 import static android.net.NetworkStats.SET_DEFAULT;
20 import static android.net.NetworkStats.SET_FOREGROUND;
21 import static android.net.NetworkStats.SET_DBG_VPN_IN;
22 import static android.net.NetworkStats.SET_DBG_VPN_OUT;
23 import static android.net.NetworkStats.SET_ALL;
24 import static android.net.NetworkStats.IFACE_ALL;
25 import static android.net.NetworkStats.TAG_NONE;
26 import static android.net.NetworkStats.UID_ALL;
45 final NetworkStats stats = new NetworkStats(TEST_START, 3) in testFindIndex()
57 final NetworkStats stats = new NetworkStats(TEST_START, 3) in testFindIndexHinted()
[all …]
DNetworkStatsHistoryTest.java97 new NetworkStats.Entry(1024L, 10L, 2048L, 20L, 2L)); in testRecordSingleBucket()
110 new NetworkStats.Entry(1024L, 10L, 128L, 2L, 2L)); in testRecordEqualBuckets()
126 new NetworkStats.Entry(1000L, 2000L, 5000L, 10000L, 100L)); in testRecordTouchingBuckets()
145 new NetworkStats.Entry(128L, 2L, 256L, 4L, 1L)); in testRecordGapBuckets()
147 new NetworkStats.Entry(64L, 1L, 512L, 8L, 2L)); in testRecordGapBuckets()
158 new NetworkStats.Entry(2048L, 4L, 2048L, 4L, 2L)); in testRecordGapBuckets()
174 new NetworkStats.Entry(256L, 2L, 256L, 2L, 1L)); in testRecordOverlapBuckets()
177 new NetworkStats.Entry(1024L, 10L, 1024L, 10L, 10L)); in testRecordOverlapBuckets()
311 final NetworkStats.Entry entry = new NetworkStats.Entry(); in testFuzzing()
349 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;
25 import android.net.NetworkStats;
92 public NetworkStats readNetworkStatsSummaryDev() throws IOException { in readNetworkStatsSummaryDev()
95 final NetworkStats stats = new NetworkStats(SystemClock.elapsedRealtime(), 6); in readNetworkStatsSummaryDev()
96 final NetworkStats.Entry entry = new NetworkStats.Entry(); in readNetworkStatsSummaryDev()
145 public NetworkStats readNetworkStatsSummaryXt() throws IOException { in readNetworkStatsSummaryXt()
151 final NetworkStats stats = new NetworkStats(SystemClock.elapsedRealtime(), 6); in readNetworkStatsSummaryXt()
[all …]
/frameworks/base/core/java/android/app/usage/
DNetworkStatsManager.java19 import android.app.usage.NetworkStats.Bucket;
99 NetworkStats stats = new NetworkStats(mContext, template, startTime, endTime); in querySummaryForDevice()
131 NetworkStats stats; in querySummaryForUser()
132 stats = new NetworkStats(mContext, template, startTime, endTime); in querySummaryForUser()
157 public NetworkStats querySummary(int networkType, String subscriberId, long startTime, in querySummary()
164 NetworkStats result; in querySummary()
165 result = new NetworkStats(mContext, template, startTime, endTime); in querySummary()
192 public NetworkStats queryDetailsForUid(int networkType, String subscriberId, in queryDetailsForUid()
199 NetworkStats result; in queryDetailsForUid()
200 result = new NetworkStats(mContext, template, startTime, endTime); in queryDetailsForUid()
[all …]
DNetworkStats.java36 public final class NetworkStats implements AutoCloseable { class
73 private android.net.NetworkStats mSummary = null;
88 private android.net.NetworkStats.Entry mRecycledSummaryEntry = null;
92 NetworkStats(Context context, NetworkTemplate template, long startTimestamp, in NetworkStats() method in NetworkStats
141 public static final int UID_ALL = android.net.NetworkStats.UID_ALL;
164 case android.net.NetworkStats.SET_ALL : return STATE_ALL; in convertState()
165 case android.net.NetworkStats.SET_DEFAULT : return STATE_DEFAULT; in convertState()
166 case android.net.NetworkStats.SET_FOREGROUND : return STATE_FOREGROUND; in convertState()
342 android.net.NetworkStats.SET_ALL, android.net.NetworkStats.TAG_NONE, in startHistoryEnumeration()
365 android.net.NetworkStats.SET_ALL, android.net.NetworkStats.TAG_NONE, in startUserUidEnumeration()
[all …]
/frameworks/base/core/tests/benchmarks/src/android/net/
DNetworkStatsBenchmark.java29 private NetworkStats mNetworkStats;
35 mNetworkStats = new NetworkStats(0, mSize + 2); in setUp()
37 NetworkStats.Entry recycle = new NetworkStats.Entry(); in setUp()
42 recycle.tag = NetworkStats.TAG_NONE; in setUp()
55 recycle.set = NetworkStats.SET_FOREGROUND; in setUp()
56 recycle.tag = NetworkStats.TAG_NONE; in setUp()
67 NetworkStats stats = mNetworkStats.clone(); in timeMigrateTun()
79 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/core/tests/coretests/src/com/android/internal/net/
DNetworkStatsFactoryTest.java19 import static android.net.NetworkStats.SET_ALL;
20 import static android.net.NetworkStats.SET_DEFAULT;
21 import static android.net.NetworkStats.SET_FOREGROUND;
22 import static android.net.NetworkStats.TAG_NONE;
23 import static android.net.NetworkStats.UID_ALL;
27 import android.net.NetworkStats;
75 final NetworkStats stats = mFactory.readNetworkStatsDetail(); in testNetworkStatsDetail()
101 final NetworkStats stats = mFactory.readNetworkStatsDetail(); in testNetworkStatsWithSet()
110 final NetworkStats stats = mFactory.readNetworkStatsSummaryDev(); in testNetworkStatsSingle()
121 final NetworkStats stats = mFactory.readNetworkStatsSummaryXt(); in testNetworkStatsXt()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/
DNetworkStatsServiceTest.java25 import static android.net.NetworkStats.IFACE_ALL;
26 import static android.net.NetworkStats.SET_ALL;
27 import static android.net.NetworkStats.SET_DEFAULT;
28 import static android.net.NetworkStats.SET_FOREGROUND;
29 import static android.net.NetworkStats.TAG_NONE;
30 import static android.net.NetworkStats.UID_ALL;
62 import android.net.NetworkStats;
205 expectNetworkStatsSummary(new NetworkStats(getElapsedRealtime(), 1) in testNetworkStatsWifi()
222 expectNetworkStatsSummary(new NetworkStats(getElapsedRealtime(), 1) in testNetworkStatsWifi()
259 expectNetworkStatsSummary(new NetworkStats(getElapsedRealtime(), 1) in testStatsRebootPersist()
[all …]
DNetworkPolicyManagerServiceTest.java67 import android.net.NetworkStats;
581 NetworkStats stats = null; in testNetworkPolicyAppliedCycleLastMonth()
610 stats = new NetworkStats(getElapsedRealtime(), 1) in testNetworkPolicyAppliedCycleLastMonth()
657 NetworkStats stats = null; in testOverWarningLimitNotification()
669 stats = new NetworkStats(getElapsedRealtime(), 1) in testOverWarningLimitNotification()
693 stats = new NetworkStats(getElapsedRealtime(), 1) in testOverWarningLimitNotification()
718 stats = new NetworkStats(getElapsedRealtime(), 1) in testOverWarningLimitNotification()
739 stats = new NetworkStats(getElapsedRealtime(), 1) in testOverWarningLimitNotification()
788 NetworkStats stats = null; in testMeteredNetworkWithoutLimit()
800 stats = new NetworkStats(getElapsedRealtime(), 1) in testMeteredNetworkWithoutLimit()
/frameworks/base/core/java/android/net/
DNetworkStats.java45 public class NetworkStats implements Parcelable { class
166 public NetworkStats(long elapsedRealtime, int initialSize) { in NetworkStats() method in NetworkStats
195 public NetworkStats(Parcel parcel) { in NetworkStats() method in NetworkStats
227 public NetworkStats clone() { in clone()
228 final NetworkStats clone = new NetworkStats(elapsedRealtime, size); in clone()
229 NetworkStats.Entry entry = null; in clone()
238 public NetworkStats addIfaceValues( in addIfaceValues()
245 public NetworkStats addValues(String iface, int uid, int set, int tag, long rxBytes, in addValues()
255 public NetworkStats addValues(Entry entry) { in addValues()
327 public NetworkStats combineValues(String iface, int uid, int tag, long rxBytes, long rxPackets, in combineValues()
[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()
DTrafficStats.java113 private static NetworkStats sActiveProfilingStart;
233 public static NetworkStats stopDataProfiling(Context context) { in stopDataProfiling()
240 final NetworkStats profilingStop = getDataLayerSnapshotForUid(context); in stopDataProfiling()
241 final NetworkStats profilingDelta = NetworkStats.subtract( in stopDataProfiling()
609 private static NetworkStats getDataLayerSnapshotForUid(Context context) { in getDataLayerSnapshotForUid()
DINetworkStatsService.aidl20 import android.net.NetworkStats;
42 NetworkStats getDataLayerSnapshotForUid(int uid); in getDataLayerSnapshotForUid()
DNetworkStatsHistory.java19 import static android.net.NetworkStats.IFACE_ALL;
20 import static android.net.NetworkStats.SET_DEFAULT;
21 import static android.net.NetworkStats.TAG_NONE;
22 import static android.net.NetworkStats.UID_ALL;
288 recordData(start, end, new NetworkStats.Entry( in recordData()
296 public void recordData(long start, long end, NetworkStats.Entry entry) { in recordData()
362 final NetworkStats.Entry entry = new NetworkStats.Entry( in recordHistory()
551 final NetworkStats.Entry entry = new NetworkStats.Entry( in generateRandom()
DNetworkStats.aidl19 parcelable NetworkStats;
/frameworks/base/core/tests/benchmarks/src/com/android/internal/net/
DNetworkStatsFactoryBenchmark.java19 import android.net.NetworkStats;
43 NetworkStatsFactory.javaReadNetworkStatsDetail(mStats, NetworkStats.UID_ALL); in timeReadNetworkStatsDetailJava()
49 final NetworkStats stats = new NetworkStats(SystemClock.elapsedRealtime(), 0); in timeReadNetworkStatsDetailNative()
51 stats, mStats.getAbsolutePath(), NetworkStats.UID_ALL); in timeReadNetworkStatsDetailNative()
/frameworks/base/services/tests/servicestests/src/com/android/server/net/
DNetworkStatsCollectionTest.java19 import static android.net.NetworkStats.SET_DEFAULT;
20 import static android.net.NetworkStats.TAG_NONE;
21 import static android.net.NetworkStats.UID_ALL;
27 import android.net.NetworkStats;
144 final NetworkStats.Entry entry = new NetworkStats.Entry(); in testStartEndAtomicBuckets()
174 final NetworkStats.Entry entry = collection.getSummary( in assertSummaryTotal()
181 final NetworkStats.Entry entry = collection.getSummary( in assertSummaryTotalIncludingTags()
187 NetworkStats.Entry entry, long rxBytes, long rxPackets, long txBytes, long txPackets) { in assertEntry()
/frameworks/base/services/core/java/com/android/server/net/
DNetworkStatsService.java30 import static android.net.NetworkStats.IFACE_ALL;
31 import static android.net.NetworkStats.SET_ALL;
32 import static android.net.NetworkStats.SET_DEFAULT;
33 import static android.net.NetworkStats.SET_FOREGROUND;
34 import static android.net.NetworkStats.TAG_NONE;
35 import static android.net.NetworkStats.UID_ALL;
87 import android.net.NetworkStats;
88 import android.net.NetworkStats.NonMonotonicObserver;
241 private NetworkStats mUidOperations = new NetworkStats(0L, 10);
492 public NetworkStats getDeviceSummaryForNetwork(NetworkTemplate template, long start, in createSession()
[all …]
DNetworkStatsCollection.java19 import static android.net.NetworkStats.IFACE_ALL;
20 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;
31 import android.net.NetworkStats;
185 if (key.uid == uid && NetworkStats.setMatches(set, key.set) && key.tag == tag in getHistory()
198 public NetworkStats getSummary(NetworkTemplate template, long start, long end) { in getSummary()
201 final NetworkStats stats = new NetworkStats(end - start, 24); in getSummary()
205 final NetworkStats.Entry entry = new NetworkStats.Entry(); in getSummary()
[all …]
DNetworkStatsRecorder.java19 import static android.net.NetworkStats.TAG_NONE;
24 import android.net.NetworkStats;
25 import android.net.NetworkStats.NonMonotonicObserver;
80 private NetworkStats mLastSnapshot;
118 public NetworkStats.Entry getTotalSinceBootLocked(NetworkTemplate template) { in getTotalSinceBootLocked()
166 public void recordSnapshotLocked(NetworkStats snapshot, in recordSnapshotLocked()
182 final NetworkStats delta = NetworkStats.subtract( in recordSnapshotLocked()
193 NetworkStats.Entry entry = null; in recordSnapshotLocked()
/frameworks/base/core/java/android/os/
DINetworkManagementService.aidl23 import android.net.NetworkStats;
254 NetworkStats getNetworkStatsSummaryDev(); in getNetworkStatsSummaryDev()
255 NetworkStats getNetworkStatsSummaryXt(); in getNetworkStatsSummaryXt()
261 NetworkStats getNetworkStatsDetail(); in getNetworkStatsDetail()
267 NetworkStats getNetworkStatsUidDetail(int uid); in getNetworkStatsUidDetail()
272 NetworkStats getNetworkStatsTethering(); in getNetworkStatsTethering()
/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/core/tests/utillib/src/android/test/
DBandwidthTestCase.java18 import android.net.NetworkStats;
105 NetworkStats stats = TrafficStats.stopDataProfiling(null); in runTest()
106 NetworkStats.Entry entry = stats.getTotal(null); in runTest()
147 private Bundle getBandwidthStats(NetworkStats.Entry entry){ in getBandwidthStats()
/frameworks/base/services/core/java/com/android/server/
DNetworkManagementService.java31 import static android.net.NetworkStats.SET_DEFAULT;
32 import static android.net.NetworkStats.TAG_ALL;
33 import static android.net.NetworkStats.TAG_NONE;
34 import static android.net.NetworkStats.UID_ALL;
57 import android.net.NetworkStats;
1618 public NetworkStats getNetworkStatsSummaryDev() { in getNetworkStatsSummaryDev()
1628 public NetworkStats getNetworkStatsSummaryXt() { in getNetworkStatsSummaryXt()
1638 public NetworkStats getNetworkStatsDetail() { in getNetworkStatsDetail()
1842 public NetworkStats getNetworkStatsUidDetail(int uid) { in getNetworkStatsUidDetail()
1852 public NetworkStats getNetworkStatsTethering() { in getNetworkStatsTethering()
[all …]

12