Home
last modified time | relevance | path

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

12

/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;
98 public NetworkStats readNetworkStatsSummaryDev() throws IOException { in readNetworkStatsSummaryDev()
101 final NetworkStats stats = new NetworkStats(SystemClock.elapsedRealtime(), 6); in readNetworkStatsSummaryDev()
102 final NetworkStats.Entry entry = new NetworkStats.Entry(); in readNetworkStatsSummaryDev()
149 public NetworkStats readNetworkStatsSummaryXt() throws IOException { in readNetworkStatsSummaryXt()
155 final NetworkStats stats = new NetworkStats(SystemClock.elapsedRealtime(), 6); in readNetworkStatsSummaryXt()
[all …]
/frameworks/base/tests/net/java/android/net/
DNetworkStatsTest.java19 import static android.net.NetworkStats.METERED_ALL;
20 import static android.net.NetworkStats.METERED_NO;
21 import static android.net.NetworkStats.METERED_YES;
22 import static android.net.NetworkStats.ROAMING_ALL;
23 import static android.net.NetworkStats.ROAMING_NO;
24 import static android.net.NetworkStats.ROAMING_YES;
25 import static android.net.NetworkStats.SET_DEFAULT;
26 import static android.net.NetworkStats.SET_FOREGROUND;
27 import static android.net.NetworkStats.SET_DBG_VPN_IN;
28 import static android.net.NetworkStats.SET_DBG_VPN_OUT;
[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/android/app/usage/
DNetworkStats.java40 public final class NetworkStats implements AutoCloseable { class
69 private int mTag = android.net.NetworkStats.TAG_NONE;
81 private android.net.NetworkStats mSummary = null;
96 private android.net.NetworkStats.Entry mRecycledSummaryEntry = null;
100 NetworkStats(Context context, NetworkTemplate template, long startTimestamp, in NetworkStats() method in NetworkStats
154 public static final int UID_ALL = android.net.NetworkStats.UID_ALL;
221 public static final int TAG_NONE = android.net.NetworkStats.TAG_NONE;
237 case android.net.NetworkStats.SET_ALL : return STATE_ALL; in convertState()
238 case android.net.NetworkStats.SET_DEFAULT : return STATE_DEFAULT; in convertState()
239 case android.net.NetworkStats.SET_FOREGROUND : return STATE_FOREGROUND; in convertState()
[all …]
DNetworkStatsManager.java23 import android.app.usage.NetworkStats.Bucket;
139 NetworkStats stats = new NetworkStats(mContext, template, startTime, endTime); in querySummaryForDevice()
176 NetworkStats stats; in querySummaryForUser()
177 stats = new NetworkStats(mContext, template, startTime, endTime); in querySummaryForUser()
203 public NetworkStats querySummary(int networkType, String subscriberId, long startTime, in querySummary()
213 NetworkStats result; in querySummary()
214 result = new NetworkStats(mContext, template, startTime, endTime); in querySummary()
225 public NetworkStats queryDetailsForUid(int networkType, String subscriberId, in queryDetailsForUid()
228 NetworkStats.Bucket.TAG_NONE); in queryDetailsForUid()
256 public NetworkStats queryDetailsForUidTag(int networkType, String subscriberId, in queryDetailsForUidTag()
[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.METERED_NO;
20 import static android.net.NetworkStats.ROAMING_NO;
21 import static android.net.NetworkStats.SET_ALL;
22 import static android.net.NetworkStats.SET_DEFAULT;
23 import static android.net.NetworkStats.SET_FOREGROUND;
24 import static android.net.NetworkStats.TAG_NONE;
25 import static android.net.NetworkStats.UID_ALL;
29 import android.net.NetworkStats;
77 final NetworkStats stats = parseDetailedStats(R.raw.xt_qtaguid_typical); in testNetworkStatsDetail()
102 final NetworkStats stats = parseDetailedStats(R.raw.xt_qtaguid_typical); in testNetworkStatsWithSet()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/net/
DNetworkStatsServiceTest.java24 import static android.net.NetworkStats.IFACE_ALL;
25 import static android.net.NetworkStats.METERED_ALL;
26 import static android.net.NetworkStats.METERED_NO;
27 import static android.net.NetworkStats.METERED_YES;
28 import static android.net.NetworkStats.ROAMING_ALL;
29 import static android.net.NetworkStats.ROAMING_NO;
30 import static android.net.NetworkStats.ROAMING_YES;
31 import static android.net.NetworkStats.SET_ALL;
32 import static android.net.NetworkStats.SET_DEFAULT;
33 import static android.net.NetworkStats.SET_FOREGROUND;
[all …]
DNetworkStatsObserversTest.java27 import static android.net.NetworkStats.SET_DEFAULT;
28 import static android.net.NetworkStats.METERED_NO;
29 import static android.net.NetworkStats.ROAMING_NO;
30 import static android.net.NetworkStats.TAG_NONE;
39 import android.net.NetworkStats;
234 NetworkStats xtSnapshot = new NetworkStats(TEST_START, 1 /* initialSize */) in testUpdateStats_initialSample_doesNotNotify()
236 NetworkStats uidSnapshot = null; in testUpdateStats_initialSample_doesNotNotify()
264 NetworkStats xtSnapshot = new NetworkStats(TEST_START, 1 /* initialSize */) in testUpdateStats_belowThreshold_doesNotNotify()
266 NetworkStats uidSnapshot = null; in testUpdateStats_belowThreshold_doesNotNotify()
272 xtSnapshot = new NetworkStats(TEST_START, 1 /* initialSize */) in testUpdateStats_belowThreshold_doesNotNotify()
[all …]
DNetworkStatsCollectionTest.java20 import static android.net.NetworkStats.SET_DEFAULT;
21 import static android.net.NetworkStats.TAG_NONE;
22 import static android.net.NetworkStats.UID_ALL;
29 import android.net.NetworkStats;
150 final NetworkStats.Entry entry = new NetworkStats.Entry(); in testStartEndAtomicBuckets()
162 final NetworkStats.Entry entry = new NetworkStats.Entry(); in testAccessLevels()
241 final NetworkStats.Entry entry = collection.getSummary( in assertSummaryTotal()
249 final NetworkStats.Entry entry = collection.getSummary( in assertSummaryTotalIncludingTags()
256 NetworkStats.Entry entry, long rxBytes, long rxPackets, long txBytes, long txPackets) { in assertEntry()
/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/core/java/android/net/
DNetworkStats.java45 public class NetworkStats implements Parcelable { class
211 public NetworkStats(long elapsedRealtime, int initialSize) { in NetworkStats() method in NetworkStats
244 public NetworkStats(Parcel parcel) { in NetworkStats() method in NetworkStats
280 public NetworkStats clone() { in clone()
281 final NetworkStats clone = new NetworkStats(elapsedRealtime, size); in clone()
282 NetworkStats.Entry entry = null; in clone()
291 public NetworkStats addIfaceValues( in addIfaceValues()
298 public NetworkStats addValues(String iface, int uid, int set, int tag, long rxBytes, in addValues()
305 public NetworkStats addValues(String iface, int uid, int set, int tag, int metered, int roaming, in addValues()
316 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()
DTrafficStats.java149 private static NetworkStats sActiveProfilingStart;
328 public static NetworkStats stopDataProfiling(Context context) { in stopDataProfiling()
335 final NetworkStats profilingStop = getDataLayerSnapshotForUid(context); in stopDataProfiling()
336 final NetworkStats profilingDelta = NetworkStats.subtract( in stopDataProfiling()
756 private static NetworkStats getDataLayerSnapshotForUid(Context context) { in getDataLayerSnapshotForUid()
DINetworkStatsService.aidl21 import android.net.NetworkStats;
45 NetworkStats getDataLayerSnapshotForUid(int uid); in getDataLayerSnapshotForUid()
/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_ALL;
35 import static android.net.NetworkStats.TAG_NONE;
36 import static android.net.NetworkStats.UID_ALL;
87 import android.net.NetworkStats;
88 import android.net.NetworkStats.NonMonotonicObserver;
250 private NetworkStats mUidOperations = new NetworkStats(0L, 10);
[all …]
DNetworkStatsCollection.java19 import static android.net.NetworkStats.IFACE_ALL;
20 import static android.net.NetworkStats.METERED_NO;
21 import static android.net.NetworkStats.METERED_YES;
22 import static android.net.NetworkStats.ROAMING_NO;
23 import static android.net.NetworkStats.ROAMING_YES;
24 import static android.net.NetworkStats.SET_ALL;
25 import static android.net.NetworkStats.SET_DEFAULT;
26 import static android.net.NetworkStats.TAG_NONE;
27 import static android.net.NetworkStats.UID_ALL;
32 import android.net.NetworkStats;
[all …]
DNetworkStatsObservers.java24 import android.net.NetworkStats;
25 import android.net.NetworkStats.NonMonotonicObserver;
108 public void updateStats(NetworkStats xtSnapshot, NetworkStats uidSnapshot, in updateStats()
370 NetworkStats stats = mCollection.getSummary(template, in getTotalBytesForNetwork()
414 NetworkStats.SET_ALL, NetworkStats.TAG_NONE, in getTotalBytesForNetworkUid()
430 NetworkStats mXtSnapshot;
431 NetworkStats mUidSnapshot;
437 StatsContext(NetworkStats xtSnapshot, NetworkStats uidSnapshot, in StatsContext()
DNetworkStatsRecorder.java19 import static android.net.NetworkStats.TAG_NONE;
26 import android.net.NetworkStats;
27 import android.net.NetworkStats.NonMonotonicObserver;
84 private NetworkStats mLastSnapshot;
151 public NetworkStats.Entry getTotalSinceBootLocked(NetworkTemplate template) { in getTotalSinceBootLocked()
211 public void recordSnapshotLocked(NetworkStats snapshot, in recordSnapshotLocked()
227 final NetworkStats delta = NetworkStats.subtract( in recordSnapshotLocked()
238 NetworkStats.Entry entry = null; in recordSnapshotLocked()
/frameworks/base/core/java/android/os/
DINetworkManagementService.aidl24 import android.net.NetworkStats;
232 NetworkStats getNetworkStatsSummaryDev(); in getNetworkStatsSummaryDev()
233 NetworkStats getNetworkStatsSummaryXt(); in getNetworkStatsSummaryXt()
239 NetworkStats getNetworkStatsDetail(); in getNetworkStatsDetail()
245 NetworkStats getNetworkStatsUidDetail(int uid); in getNetworkStatsUidDetail()
250 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/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()
DChartDataLoader.java19 import static android.net.NetworkStats.SET_DEFAULT;
20 import static android.net.NetworkStats.SET_FOREGROUND;
21 import static android.net.NetworkStats.TAG_NONE;
/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()

12