mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-09-02 11:22:41 +01:00
netstats: added "period" parameter.
This parameter allows specifying polling period for the on-device service.
This commit is contained in:
@@ -141,6 +141,11 @@ class NetstatsInstrument(Instrument):
|
|||||||
List of Android packages who's traffic will be monitored. If
|
List of Android packages who's traffic will be monitored. If
|
||||||
unspecified, all packages in the device will be monitorred.
|
unspecified, all packages in the device will be monitorred.
|
||||||
"""),
|
"""),
|
||||||
|
Parameter('period', kind=int, default=5,
|
||||||
|
description="""
|
||||||
|
Polling period for instrumentation on the device. Traffic statistics
|
||||||
|
will be updated every ``period`` seconds.
|
||||||
|
"""),
|
||||||
Parameter('force_reinstall', kind=bool, default=False,
|
Parameter('force_reinstall', kind=bool, default=False,
|
||||||
description="""
|
description="""
|
||||||
If ``True``, instrumentation APK will always be re-installed even if
|
If ``True``, instrumentation APK will always be re-installed even if
|
||||||
@@ -161,7 +166,7 @@ class NetstatsInstrument(Instrument):
|
|||||||
self.collector.setup(force=self.force_reinstall)
|
self.collector.setup(force=self.force_reinstall)
|
||||||
|
|
||||||
def setup(self, context):
|
def setup(self, context):
|
||||||
self.collector.reset(sites=self.packages)
|
self.collector.reset(sites=self.packages, period=self.period)
|
||||||
|
|
||||||
def start(self, context):
|
def start(self, context):
|
||||||
self.collector.start()
|
self.collector.start()
|
||||||
|
Reference in New Issue
Block a user