|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.javalite.activejdbc.statistics.StatisticsQueue
public class StatisticsQueue
This class will collect statistics on executed queries and then can produce reports sorted by various parameters. Configuration is simple, add this line:
collectStatistics=true
to the fileactivejdbc.properties on the command line.
After that, simply collect reports like this:
List totals = Registry.getStatisticsQueue().getReportSortedBy("total") {
| Constructor Summary | |
|---|---|
StatisticsQueue(boolean paused)
|
|
| Method Summary | |
|---|---|
Future |
enqueue(QueryExecutionEvent event)
Enqueues a query execution event for processing. |
List<QueryStats> |
getReportSortedBy(String sortByVal)
Produces a report sorted by one of the accepted value. |
boolean |
isPaused()
|
void |
pause(boolean val)
|
void |
reset()
|
void |
run()
Deprecated. this method is deprecated and blank - does nothing. It will be removed in future versions |
void |
stop()
Shutdowns StatisticsQueue completely, new StatisticsQueue should be created to start gathering statistics again |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StatisticsQueue(boolean paused)
| Method Detail |
|---|
public boolean isPaused()
public void stop()
public void run()
public void pause(boolean val)
public Future enqueue(QueryExecutionEvent event)
event - instance of event.
null.public void reset()
public List<QueryStats> getReportSortedBy(String sortByVal)
sortByVal - - allowed values: "total", "avg", "min", "max", "count"
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||