aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorMike Chan <mike@android.com>2011-12-02 13:52:43 +0800
committerJohn Stultz <john.stultz@linaro.org>2012-02-14 14:21:09 -0800
commit93bea487ce482372e167d47aca02efcad19d665a (patch)
treeb4032d8ad682aaff1f448777cf3bd404246a37d1 /net
parentcb67156fcefcc39941fcc75ff3a4f06c16641c6c (diff)
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>
Diffstat (limited to 'net')
-rw-r--r--net/Kconfig8
-rw-r--r--net/Makefile1
2 files changed, 9 insertions, 0 deletions
diff --git a/net/Kconfig b/net/Kconfig
index 6ab695a7f4a..e5691816425 100644
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -85,6 +85,14 @@ config ANDROID_PARANOID_NETWORK
help
none
+config NET_ACTIVITY_STATS
+ bool "Network activity statistics tracking"
+ default y
+ help
+ Network activity statistics are useful for tracking wireless
+ modem activity on 2G, 3G, 4G wireless networks. Counts number of
+ transmissions and groups them in specified time buckets.
+
config NETWORK_SECMARK
bool "Security Marking"
help
diff --git a/net/Makefile b/net/Makefile
index ad432fa4d93..b0bec0a02e8 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -68,5 +68,6 @@ obj-$(CONFIG_WIMAX) += wimax/
obj-$(CONFIG_DNS_RESOLVER) += dns_resolver/
obj-$(CONFIG_CEPH_LIB) += ceph/
obj-$(CONFIG_BATMAN_ADV) += batman-adv/
+obj-$(CONFIG_NET_ACTIVITY_STATS) += activity_stats.o
obj-$(CONFIG_NFC) += nfc/
obj-$(CONFIG_OPENVSWITCH) += openvswitch/