Class SQLiteDebug

  • All Implemented Interfaces:

    
    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

    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final static boolean shouldLogSlowQuery(long elapsedTimeMillis) Determines whether a query should be logged.
      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
    • Constructor Detail

    • 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 changed by the user at any time. If the value is zero, then all queries will be considered slow. If the value does not exist or is negative, then no queries will be considered slow. This value can be changed dynamically while the system is running. For example, "adb shell setprop db.log.slow_query_threshold 200" will log 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