com.endeca.portal.instrumentation.metrics
Class MDEXMetric

java.lang.Object
  extended by com.endeca.portal.instrumentation.metrics.MDEXMetric

public class MDEXMetric
extends java.lang.Object

Pretty simple bean to represent all queries to a specific MDEX, covering both cached and uncached queries

Author:
dan

Constructor Summary
MDEXMetric(java.lang.String key)
          Creates a new instance with the given key
 
Method Summary
 long getAverageCachedDataQueryTime()
          Returns the dumb average (totalExecutionTime/numExecutions) execution time for cached queries
 long getAverageDataQueryTime()
          Returns the dumb average (totalExecutionTime/numExecutions) execution time for uncached queries
 QueryMetric getCached()
          Gets the QueryMetric for queries to this MDEX that were cached
 long getCachedDataQueryCount()
          Returns the total number of cached queries
 long getCachedDataQueryTime()
          Returns the total aggregate execution time for all cached queries
 double getDataQueryCacheHitPercentage()
          Returns the percentage of queries that were served from the cache
 long getDataQueryCount()
          Returns the total number of uncached queries
 long getDataQueryTime()
          Returns the total aggregate execution time for all uncached queries
 java.lang.String getKey()
          Returns the key for this metric, typically the DataSource name/description
 long getMaxCachedDataQueryTime()
          Returns the maximum execution time out of all cached queries
 long getMaxDataQueryTime()
          Returns the maximum execution time out of all uncached queries
 QueryMetric getUncached()
          Gets the QueryMetric for queries to this MDEX that were not cached
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MDEXMetric

public MDEXMetric(java.lang.String key)
Creates a new instance with the given key

Parameters:
key - typically represents a DataSource (an MDEX)
Method Detail

getCached

public QueryMetric getCached()
Gets the QueryMetric for queries to this MDEX that were cached

Returns:
the QueryMetric for cached queries

getUncached

public QueryMetric getUncached()
Gets the QueryMetric for queries to this MDEX that were not cached

Returns:
the QueryMetric for uncached queries

getDataQueryCount

public long getDataQueryCount()
Returns the total number of uncached queries

Returns:
the total count

getDataQueryTime

public long getDataQueryTime()
Returns the total aggregate execution time for all uncached queries

Returns:
the total execution time

getAverageDataQueryTime

public long getAverageDataQueryTime()
Returns the dumb average (totalExecutionTime/numExecutions) execution time for uncached queries

Returns:
the average execution time

getMaxDataQueryTime

public long getMaxDataQueryTime()
Returns the maximum execution time out of all uncached queries

Returns:
the max query time

getCachedDataQueryCount

public long getCachedDataQueryCount()
Returns the total number of cached queries

Returns:
the total count

getCachedDataQueryTime

public long getCachedDataQueryTime()
Returns the total aggregate execution time for all cached queries

Returns:
the total execution time

getAverageCachedDataQueryTime

public long getAverageCachedDataQueryTime()
Returns the dumb average (totalExecutionTime/numExecutions) execution time for cached queries

Returns:
the average execution time

getMaxCachedDataQueryTime

public long getMaxCachedDataQueryTime()
Returns the maximum execution time out of all cached queries

Returns:
the max query time

getDataQueryCacheHitPercentage

public double getDataQueryCacheHitPercentage()
Returns the percentage of queries that were served from the cache

Returns:
the percentage as a double

getKey

public java.lang.String getKey()
Returns the key for this metric, typically the DataSource name/description

Returns:
this metric's key