| Index: client/samples/control.profilers
|
| diff --git a/client/samples/control.profilers b/client/samples/control.profilers
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..5ed545fc017d42c617224825ff28d6db23cceb17
|
| --- /dev/null
|
| +++ b/client/samples/control.profilers
|
| @@ -0,0 +1,24 @@
|
| +AUTHOR = "Autotest Team <autotest@test.kernel.org>"
|
| +TIME = "SHORT"
|
| +NAME = "Sample - More profilers"
|
| +TEST_TYPE = "client"
|
| +TEST_CLASS = "Kernel"
|
| +TEST_CATEGORY = "Functional"
|
| +
|
| +DOC = """
|
| +Runs sleeptest with differnt profilers present in the autotest tree. Also,
|
| +it shows the convenience logging methods, such as logging.info and
|
| +logging.error.
|
| +"""
|
| +
|
| +import logging
|
| +
|
| +for profiler in ('readprofile', 'oprofile', 'catprofile', 'lockmeter'):
|
| + try:
|
| + logging.info("Testing profiler %s", profiler)
|
| + job.profilers.add(profiler)
|
| + job.run_test('sleeptest', seconds=5, tag=profiler)
|
| + job.profilers.delete(profiler)
|
| + except:
|
| + logging.error("Test of profiler %s failed", profiler)
|
| + raise
|
|
|