Commit Graph

2 Commits

Author SHA1 Message Date
Arve Hjønnevåg 4af1c50c2b net: activity_stats: Stop using obsolete create_proc_read_entry api
Convert to use seq_read

Signed-off-by: Arve Hjønnevåg <arve@android.com>
2013-07-01 15:52:02 -07:00
Mike Chan 1f65785d2b 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>
2013-07-01 13:40:29 -07:00