OSDN Git Service

sens: add check_sample_rate function to verify if events frequency exceeds some rate...
authorMaria Constantin <maria.p.constantin@intel.com>
Fri, 29 May 2015 12:05:40 +0000 (15:05 +0300)
committerGerrit Code Review <gerrit2@irsgerrit001.ir.intel.com>
Thu, 11 Jun 2015 13:11:28 +0000 (14:11 +0100)
commita1f77941c182b0d017bb0b2519738803fc0ba1c0
tree96b44d85e324777e9f3486b291f1e37e386661c1
parenteb8eec15c86e99da9dabd95326e9ae04c2e6d3c4
sens: add check_sample_rate function to verify if events frequency exceeds some rate per second

Allows passing the rate as parameter to the check_sample_rate method.
Starts polling for one second or until a number of events, equal with the
rate, is reached. Finally, verifies if the rate of events per second is
reached (if it is true, will print "test passed", otherwise will print
"test failed")
ex: sens check_sample_rate 100
Will print "test passed" if the number of events in 1 second exceeds 100,
otherwise will print "test failed".

Change-Id: Ic84e9fe13a577435bf55304b0aecafdd83b00f47
Signed-off-by: Maria Constantin <maria.p.constantin@intel.com>
sens.c