diff options
author | Jeff Sharkey <jsharkey@android.com> | 2011-08-10 17:53:27 -0700 |
---|---|---|
committer | Jeff Sharkey <jsharkey@android.com> | 2011-08-15 17:30:25 -0700 |
commit | b5d55e302d2253e4bfb233ea705caf258cdc4cb9 (patch) | |
tree | 7acd6751833ddeae0a6dbc97c8608cd986643018 /core/tests/bandwidthtests/src | |
parent | 11f4a48c54f3006778c874662ff04a4d9d157f25 (diff) | |
download | frameworks_base-b5d55e302d2253e4bfb233ea705caf258cdc4cb9.zip frameworks_base-b5d55e302d2253e4bfb233ea705caf258cdc4cb9.tar.gz frameworks_base-b5d55e302d2253e4bfb233ea705caf258cdc4cb9.tar.bz2 |
Foreground/background network stats using sets.
Teach NetworkStats about "counter sets" coming from kernel, and use
them to track usage in foreground/background. Add AID_NET_BW_ACCT to
system_server so it can control counter sets.
Move to composite key of NetworkIdentitySet, UID, set, and tag when
recording historical usage. Persisting still clusters by identity,
since that is heaviest object.
Request async stats poll during systemReady() to bootstrap later
delta calculations. Reset kernel counters when UID removed. Update
various tests.
Bug: 5105592, 5146067
Change-Id: Idabec9e3ffcaf212879821515602ecde0a03de8c
Diffstat (limited to 'core/tests/bandwidthtests/src')
-rw-r--r-- | core/tests/bandwidthtests/src/com/android/bandwidthtest/BandwidthTest.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/tests/bandwidthtests/src/com/android/bandwidthtest/BandwidthTest.java b/core/tests/bandwidthtests/src/com/android/bandwidthtest/BandwidthTest.java index 73c92b0..5ee8fdd 100644 --- a/core/tests/bandwidthtests/src/com/android/bandwidthtest/BandwidthTest.java +++ b/core/tests/bandwidthtests/src/com/android/bandwidthtest/BandwidthTest.java @@ -164,7 +164,8 @@ public class BandwidthTest extends InstrumentationTestCase { File snd_stat = new File (root_filepath + "tcp_snd"); int tx = BandwidthTestUtil.parseIntValueFromFile(snd_stat); NetworkStats stats = new NetworkStats(SystemClock.elapsedRealtime(), 1); - stats.addValues(NetworkStats.IFACE_ALL, uid, NetworkStats.TAG_NONE, rx, 0, tx, 0); + stats.addValues(NetworkStats.IFACE_ALL, uid, NetworkStats.SET_DEFAULT, + NetworkStats.TAG_NONE, rx, 0, tx, 0, 0); return stats; } |