1e0493a4af57c1a73376a7bafaed542c01f588196Eric LiAUTHOR = "Autotest Team <autotest@test.kernel.org>"
2e0493a4af57c1a73376a7bafaed542c01f588196Eric LiTIME = "MEDIUM"
3e0493a4af57c1a73376a7bafaed542c01f588196Eric LiNAME = "Sample - Using profilers"
4e0493a4af57c1a73376a7bafaed542c01f588196Eric LiTEST_TYPE = "client"
5e0493a4af57c1a73376a7bafaed542c01f588196Eric LiTEST_CLASS = "Kernel"
6e0493a4af57c1a73376a7bafaed542c01f588196Eric LiTEST_CATEGORY = "Functional"
7e0493a4af57c1a73376a7bafaed542c01f588196Eric Li
8e0493a4af57c1a73376a7bafaed542c01f588196Eric LiDOC = """
9e0493a4af57c1a73376a7bafaed542c01f588196Eric LiRuns our sleeptest (bogus test that only sleeps for a given amount of time),
10e0493a4af57c1a73376a7bafaed542c01f588196Eric Liwhile running the oprofile profilers, with and without special parameters
11e0493a4af57c1a73376a7bafaed542c01f588196Eric Lipassed to the profiler.
12e0493a4af57c1a73376a7bafaed542c01f588196Eric Li"""
13e0493a4af57c1a73376a7bafaed542c01f588196Eric Li
14e0493a4af57c1a73376a7bafaed542c01f588196Eric Liimport logging
15e0493a4af57c1a73376a7bafaed542c01f588196Eric Li
16e0493a4af57c1a73376a7bafaed542c01f588196Eric Lilogging.info("Testing default event")
17e0493a4af57c1a73376a7bafaed542c01f588196Eric Lijob.profilers.add('oprofile')
18e0493a4af57c1a73376a7bafaed542c01f588196Eric Lijob.run_test('sleeptest', seconds=5, tag='default')
19e0493a4af57c1a73376a7bafaed542c01f588196Eric Lijob.profilers.delete('oprofile')
20e0493a4af57c1a73376a7bafaed542c01f588196Eric Li
21e0493a4af57c1a73376a7bafaed542c01f588196Eric Lilogging.info("Testing ICACHE_MISSES")
22e0493a4af57c1a73376a7bafaed542c01f588196Eric Lijob.profilers.add('oprofile', 'ICACHE_MISSES:100000')
23e0493a4af57c1a73376a7bafaed542c01f588196Eric Lijob.run_test('sleeptest', seconds=5, tag='icache_misses')
24e0493a4af57c1a73376a7bafaed542c01f588196Eric Lijob.profilers.delete('oprofile')
25