FileDocCategorySizeDatePackage
SQLiteDebug.javaAPI DocAndroid 1.5 API3516Wed May 06 22:41:54 BST 2009android.database.sqlite

SQLiteDebug

public final class SQLiteDebug extends Object
Provides debugging info about all SQLite databases running in the current process. {@hide}

Fields Summary
public static final boolean
DEBUG_SQL_STATEMENTS
Controls the printing of SQL statements as they are executed.
public static final boolean
DEBUG_ACTIVE_CURSOR_FINALIZATION
Controls the stack trace reporting of active cursors being finalized.
public static final boolean
DEBUG_LOCK_TIME_TRACKING
Controls the tracking of time spent holding the database lock.
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.
private static int
sNumActiveCursorsFinalized
Constructors Summary
Methods Summary
public static native longgetHeapAllocatedSize()
Returns the amount of allocated memory in the SQLite heap.

return
The allocated size in bytes.

public static native voidgetHeapDirtyPages(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

public static native longgetHeapFreeSize()
Returns the amount of free memory in the SQLite heap.

return
The freed size in bytes.

public static native longgetHeapSize()
Returns the size of the SQLite heap.

return
The size of the SQLite heap in bytes.

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


                                
        
        return sNumActiveCursorsFinalized;
    
public static native voidgetPagerStats(android.database.sqlite.SQLiteDebug$PagerStats stats)
Gathers statistics about all pagers in the current process.

static synchronized voidnotifyActiveCursorFinalized()

        sNumActiveCursorsFinalized++;