public abstract static class DatabasePerformanceTests.PerformanceBase extends Object implements TestCase, PerformanceTestCase
PerformanceTestCase.Intermediates
Modifier and Type | Field and Description |
---|---|
protected static int |
CURRENT_DATABASE_VERSION |
protected Context |
mContext |
protected SQLiteDatabase |
mDatabase |
protected File |
mDatabaseFile |
Constructor and Description |
---|
DatabasePerformanceTests.PerformanceBase() |
Modifier and Type | Method and Description |
---|---|
boolean |
isPerformanceOnly()
This method is used to determine what modes this test case can run in.
|
String |
numberName(int number) |
void |
run()
Starts executing the active part of the class' code.
|
void |
setUp(Context c)
Called before run() is called.
|
int |
startPerformance(PerformanceTestCase.Intermediates intermediates)
Set up to begin performance tests.
|
void |
tearDown()
Called after run() is called, even if run() threw an exception, but
not if setUp() threw an execption.
|
protected static final int CURRENT_DATABASE_VERSION
protected SQLiteDatabase mDatabase
protected File mDatabaseFile
protected Context mContext
public DatabasePerformanceTests.PerformanceBase()
public void setUp(Context c)
TestCase
public void tearDown()
TestCase
public boolean isPerformanceOnly()
PerformanceTestCase
isPerformanceOnly
in interface PerformanceTestCase
public int startPerformance(PerformanceTestCase.Intermediates intermediates)
PerformanceTestCase
If you return a non-zero iteration count, you should call
intermediates.startTiming
and
intermediates.endTiming
to report the
duration of the test whose performance should actually be measured.
startPerformance
in interface PerformanceTestCase
intermediates
- Callback for sending intermediate results.public void run()
Runnable
Runnable
.public String numberName(int number)