net: activity_stats: Add statistics for network transmission activity
authorMike Chan <mike@android.com>
Fri, 28 May 2010 21:32:19 +0000 (14:32 -0700)
committerArve Hjønnevåg <arve@android.com>
Mon, 1 Jul 2013 20:40:29 +0000 (13:40 -0700)
commit1f65785d2b92ccad4ebab8f0b39c9e232d76946f
tree091679c8a8ca27523364a4df230fcd7d3643c6e7
parent67418b78df13d941313b94b1357db5bd0aeb17ef
net: activity_stats: Add statistics for network transmission activity

When enabled, tracks the frequency of network transmissions
(inbound and outbound) and buckets them accordingly.
Buckets are determined by time between network activity.

Each bucket represents the number of network transmisions that were
N sec or longer apart. Where N is defined as 1 << bucket index.

This network pattern tracking is particularly useful for wireless
networks (ie: 3G) where batching network activity closely together
is more power efficient than far apart.

New file: /proc/net/stat/activity

output:

Min Bucket(sec) Count
              1 7
              2 0
              4 1
              8 0
             16 0
             32 2
             64 1
            128 0

Change-Id: I4c4cd8627b872a55f326b1715c51bc3bdd6e8d92
Signed-off-by: Mike Chan <mike@android.com>
drivers/misc/uid_stat.c
include/net/activity_stats.h [new file with mode: 0644]
net/Kconfig
net/Makefile
net/activity_stats.c [new file with mode: 0644]