net.sf.infrared.agent.jdbcstats
Class SqlStatistics
java.lang.Object
net.sf.infrared.agent.jdbcstats.SqlStatistics
- All Implemented Interfaces:
- Cloneable, Serializable
- public class SqlStatistics
- extends Object
- implements Cloneable, Serializable
Stores the statistics of a sql along with its id
- See Also:
- Serialized Form
AVG_EXECUTION_TIME
public static final int AVG_EXECUTION_TIME
- See Also:
- Constant Field Values
EXECUTION_COUNT
public static final int EXECUTION_COUNT
- See Also:
- Constant Field Values
SqlStatistics
public SqlStatistics()
- To get rid of castor errors. This version shouldn't be used
SqlStatistics
public SqlStatistics(Long id)
prepared
public void prepared(long time)
- Record a succesful call to prepare a sql
- Parameters:
time - - time consumed by the prepare call
executed
public void executed(long time,
boolean prepared)
- Record a successful execution of a sql
- Parameters:
time - - time consumed to executeprepared - - was it a prepared statement or not
fetched
public void fetched(long noOfRowsFetched,
long timeTakenForFetch)
executedWithError
public void executedWithError(long time,
boolean prepared)
- Record a query execution failure
- Parameters:
time - - time consumed to execute queryprepared - - whether it was a prepared statement or not
getId
public Long getId()
getNoOfExecutes
public long getNoOfExecutes()
getNoOfPrepares
public long getNoOfPrepares()
getTotalExecuteTime
public long getTotalExecuteTime()
getMaxExecuteTime
public long getMaxExecuteTime()
getMinExecuteTime
public long getMinExecuteTime()
getAvgExecuteTime
public double getAvgExecuteTime()
getAvgPrepareTime
public double getAvgPrepareTime()
getTotalPrepareTime
public long getTotalPrepareTime()
getMaxPrepareTime
public long getMaxPrepareTime()
getMinPrepareTime
public long getMinPrepareTime()
getLastExecuteTime
public long getLastExecuteTime()
getLastPrepareTime
public long getLastPrepareTime()
getTotalNoOfRowsFetched
public long getTotalNoOfRowsFetched()
getMaxRowsFetched
public long getMaxRowsFetched()
getMinRowsFetched
public long getMinRowsFetched()
getAverageNoOfRowsPerFetch
public long getAverageNoOfRowsPerFetch()
getTotalFetchCount
public long getTotalFetchCount()
getTotalFetchTime
public long getTotalFetchTime()
getAverageTimePerFetch
public double getAverageTimePerFetch()
copy
public SqlStatistics copy()
getFirstExecuteTime
public long getFirstExecuteTime()
getFirstPrepareTime
public long getFirstPrepareTime()
getTotalExecuteErrors
public long getTotalExecuteErrors()
getSql
public String getSql()
setSql
public void setSql(String sql)
aggreagte
public void aggreagte(SqlStatistics other)
toString
public String toString()