Build 1.0_r1(from source)

android.database.sqlite
Class SQLiteDebug

java.lang.Object
  extended by android.database.sqlite.SQLiteDebug

public final class SQLiteDebug
extends Object

Provides debugging info about all SQLite databases running in the current process.


Nested Class Summary
static class SQLiteDebug.PagerStats
          Contains statistics about the active pagers in the current process.
 
Field Summary
static boolean DEBUG_ACTIVE_CURSOR_FINALIZATION
          Controls the stack trace reporting of active cursors being finalized.
static boolean DEBUG_LOCK_TIME_TRACKING
          Controls the tracking of time spent holding the database lock.
static boolean DEBUG_LOCK_TIME_TRACKING_STACK_TRACE
          Controls the printing of stack traces when tracking the time spent holding the database lock.
static boolean DEBUG_SQL_STATEMENTS
          Controls the printing of SQL statements as they are executed.
 
Constructor Summary
SQLiteDebug()
           
 
Method Summary
static long getHeapAllocatedSize()
          Returns the amount of allocated memory in the SQLite heap.
static void getHeapDirtyPages(int[] pages)
          Determines the number of dirty belonging to the SQLite heap segments of this process.
static long getHeapFreeSize()
          Returns the amount of free memory in the SQLite heap.
static long getHeapSize()
          Returns the size of the SQLite heap.
static int getNumActiveCursorsFinalized()
          Returns the number of active cursors that have been finalized.
static void getPagerStats(SQLiteDebug.PagerStats stats)
          Gathers statistics about all pagers in the current process.
(package private) static void notifyActiveCursorFinalized()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG_SQL_STATEMENTS

public static final boolean DEBUG_SQL_STATEMENTS
Controls the printing of SQL statements as they are executed.

See Also:
Constant Field Values

DEBUG_ACTIVE_CURSOR_FINALIZATION

public static final boolean DEBUG_ACTIVE_CURSOR_FINALIZATION
Controls the stack trace reporting of active cursors being finalized.

See Also:
Constant Field Values

DEBUG_LOCK_TIME_TRACKING

public static final boolean DEBUG_LOCK_TIME_TRACKING
Controls the tracking of time spent holding the database lock.

See Also:
Constant Field Values

DEBUG_LOCK_TIME_TRACKING_STACK_TRACE

public static final boolean DEBUG_LOCK_TIME_TRACKING_STACK_TRACE
Controls the printing of stack traces when tracking the time spent holding the database lock.

See Also:
Constant Field Values
Constructor Detail

SQLiteDebug

public SQLiteDebug()
Method Detail

getPagerStats

public static void getPagerStats(SQLiteDebug.PagerStats stats)
Gathers statistics about all pagers in the current process.


getHeapSize

public static long getHeapSize()
Returns the size of the SQLite heap.

Returns:
The size of the SQLite heap in bytes.

getHeapAllocatedSize

public static long getHeapAllocatedSize()
Returns the amount of allocated memory in the SQLite heap.

Returns:
The allocated size in bytes.

getHeapFreeSize

public static long getHeapFreeSize()
Returns the amount of free memory in the SQLite heap.

Returns:
The freed size in bytes.

getHeapDirtyPages

public static void getHeapDirtyPages(int[] pages)
Determines the number of dirty belonging to the SQLite heap segments of this process. pages[0] returns the number of shared pages, pages[1] returns the number of private pages


getNumActiveCursorsFinalized

public static int getNumActiveCursorsFinalized()
Returns the number of active cursors that have been finalized. This depends on the GC having run but is still useful for tests.


notifyActiveCursorFinalized

static void notifyActiveCursorFinalized()

Build 1.0_r1(from source)

Please submit a feedback, bug or feature