edu.internet2.middleware.grouperClient.jdbc
Class GcQueryReport

java.lang.Object
  extended by edu.internet2.middleware.grouperClient.jdbc.GcQueryReport

public class GcQueryReport
extends java.lang.Object

Structure to encapsulate data about a query being executed.

Author:
harveycg

Constructor Summary
GcQueryReport()
           
 
Method Summary
 void addExecutionTime(long millis)
          Add an execution time.
 java.lang.Long getCumulativeTimeMillis()
          Total time spent, will include any nested queries and code.
 int getNumberOfExecutions()
          How many times the query was executed.
 java.lang.String getQuery()
          Query that was executed.
static void reportToFile(java.lang.String fileLocation, java.util.Map<java.lang.String,GcQueryReport> queryReports)
          Write out a csv report to the given file path.
 void setCumulativeTime(java.lang.Long _cumulativeTimeMillis)
          Total time spent, will include any nested queries and code.
 void setNumberOfExecutions(int _numberOfExecutions)
          How many times the query was executed.
 void setQuery(java.lang.String _query)
          Query that was executed.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GcQueryReport

public GcQueryReport()
Method Detail

reportToFile

public static void reportToFile(java.lang.String fileLocation,
                                java.util.Map<java.lang.String,GcQueryReport> queryReports)
Write out a csv report to the given file path.

Parameters:
fileLocation - is the loaction of the file to write.
queryReports - is the map of reports.

addExecutionTime

public void addExecutionTime(long millis)
Add an execution time.

Parameters:
millis - is the millis to add.

getQuery

public java.lang.String getQuery()
Query that was executed.

Returns:
the query

setQuery

public void setQuery(java.lang.String _query)
Query that was executed.

Parameters:
_query - the query to set

getCumulativeTimeMillis

public java.lang.Long getCumulativeTimeMillis()
Total time spent, will include any nested queries and code.

Returns:
the cumulativeTime

setCumulativeTime

public void setCumulativeTime(java.lang.Long _cumulativeTimeMillis)
Total time spent, will include any nested queries and code.

Parameters:
_cumulativeTimeMillis - the cumulativeTime to set

getNumberOfExecutions

public int getNumberOfExecutions()
How many times the query was executed.

Returns:
the numberOfExecutions

setNumberOfExecutions

public void setNumberOfExecutions(int _numberOfExecutions)
How many times the query was executed.

Parameters:
_numberOfExecutions - the numberOfExecutions to set