com.almworks.sqlite4java
Class SQLiteProfiler

java.lang.Object
  extended by com.almworks.sqlite4java.SQLiteProfiler

public class SQLiteProfiler
extends java.lang.Object

SQLiteProfiler measures and accumulates statistics for various SQLite methods. The statistics is then available in a report form.

To start profiling, call SQLiteConnection.profile() and get the profiler. After profiling is done, call SQLiteConnection.stopProfiling() and inspect the profiler's results.

This is pure Java-based profiling, not related to sqlite3_profile method.

Author:
Igor Sereda
See Also:
SQLiteConnection.profile(), SQLiteConnection.stopProfiling()

Constructor Summary
SQLiteProfiler()
           
 
Method Summary
 java.lang.String printReport()
          Returns current report as a String.
 void printReport(java.io.PrintWriter out)
          Outputs current report into PrintWriter.
 void printReport(java.lang.String file)
          Prints report to a file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SQLiteProfiler

public SQLiteProfiler()
Method Detail

printReport

public void printReport(java.io.PrintWriter out)
Outputs current report into PrintWriter.

Parameters:
out - report writer

printReport

public java.lang.String printReport()
Returns current report as a String.

Returns:
current report

printReport

public void printReport(java.lang.String file)
Prints report to a file. If IOException occurs, write warning log message, but does not throw it on the caller.

Parameters:
file - target file