diff options
author | Tsu Chiang Chuang <tsu@google.com> | 2011-09-26 14:33:24 -0700 |
---|---|---|
committer | Tsu Chiang Chuang <tsu@google.com> | 2011-09-26 14:33:24 -0700 |
commit | 9cf416fde65fd5795d5e40be7bda0557611bc562 (patch) | |
tree | bb16c6df29e260c0bb340ea6c5d711a3a599c80c /tests/DataIdleTest | |
parent | 3a423234bcfabf319977bfaa4467a8b8df8d3401 (diff) | |
download | frameworks_base-9cf416fde65fd5795d5e40be7bda0557611bc562.zip frameworks_base-9cf416fde65fd5795d5e40be7bda0557611bc562.tar.gz frameworks_base-9cf416fde65fd5795d5e40be7bda0557611bc562.tar.bz2 |
adding packet count and removing extra uid stats that were used for debugging.
Change-Id: I19664ee991760b9515fc129be50be68579f8ce93
Diffstat (limited to 'tests/DataIdleTest')
-rw-r--r-- | tests/DataIdleTest/src/com/android/tests/dataidle/DataIdleTest.java | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/DataIdleTest/src/com/android/tests/dataidle/DataIdleTest.java b/tests/DataIdleTest/src/com/android/tests/dataidle/DataIdleTest.java index b803b98..a13c0c9 100644 --- a/tests/DataIdleTest/src/com/android/tests/dataidle/DataIdleTest.java +++ b/tests/DataIdleTest/src/com/android/tests/dataidle/DataIdleTest.java @@ -89,18 +89,27 @@ public class DataIdleTest extends InstrumentationTestCase { Bundle result = new Bundle(); long rxBytes = 0; long txBytes = 0; + long rxPackets = 0; + long txPackets = 0; for (int i = 0; i < stats.size(); ++i) { // Label will be iface_uid_tag_set Entry statsEntry = stats.getValues(i, null); + // Debugging use. + /* String labelTemplate = String.format("%s_%d_%d_%d", statsEntry.iface, statsEntry.uid, statsEntry.tag, statsEntry.set) + "_%s"; result.putLong(String.format(labelTemplate, "rxBytes"), statsEntry.rxBytes); result.putLong(String.format(labelTemplate, "txBytes"), statsEntry.txBytes); + */ + rxPackets += statsEntry.rxPackets; rxBytes += statsEntry.rxBytes; + txPackets += statsEntry.txPackets; txBytes += statsEntry.txBytes; } - result.putLong("Total rxBytes", rxBytes); - result.putLong("Total txBytes", txBytes); + result.putLong("Total rx Bytes", rxBytes); + result.putLong("Total tx Bytes", txBytes); + result.putLong("Total rx Packets", rxPackets); + result.putLong("Total tx Packets", txPackets); getInstrumentation().sendStatus(INSTRUMENTATION_IN_PROGRESS, result); } |