Package 

Class SQLiteDebug


  • 
    public final class SQLiteDebug
    
                        

    Provides debugging info about all SQLite databases running in the current process. {@hide}

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public class SQLiteDebug.PagerStats

      Contains statistics about the active pagers in the current process.

      public class SQLiteDebug.DbStats

      contains statistics about a database

    • Method Summary

      Modifier and Type Method Description
      final static boolean shouldLogSlowQuery(long elapsedTimeMillis) Determines whether a query should be logged.Reads the "db.log.slow_query_threshold" system property, which can be changedby the user at any time.
      static SQLiteDebug.PagerStats getDatabaseInfo() return all pager and database stats for the current process.
      static void dump(Printer printer, Array<String> args) Dumps detailed information about all databases used by the process.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • shouldLogSlowQuery

         final static boolean shouldLogSlowQuery(long elapsedTimeMillis)

        Determines whether a query should be logged.Reads the "db.log.slow_query_threshold" system property, which can be changedby the user at any time. If the value is zero, then all queries willbe considered slow. If the value does not exist or is negative, then no queries willbe considered slow.This value can be changed dynamically while the system is running.For example, "adb shell setprop db.log.slow_query_threshold 200" willlog all queries that take 200ms or longer to run.

      • dump

         static void dump(Printer printer, Array<String> args)

        Dumps detailed information about all databases used by the process.

        Parameters:
        printer - The printer for dumping database state.
        args - Command-line arguments supplied to dumpsys dbinfo