OmniSciDB  d2f719934e
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CacheItemMetric Class Reference

#include <DataRecycler.h>

Public Member Functions

 CacheItemMetric (QueryPlanHash query_plan_hash, size_t compute_time, size_t mem_size)
 
QueryPlanHash getQueryPlanHash () const
 
void incRefCount ()
 
size_t getRefCount () const
 
size_t getComputeTime () const
 
size_t getMemSize () const
 
const std::array< size_t,
CacheMetricType::NUM_METRIC_TYPE > & 
getMetrics () const
 
void setComputeTime (size_t compute_time)
 
void setMemSize (const size_t mem_size)
 
std::string toString () const
 

Private Attributes

const QueryPlanHash query_plan_hash_
 
std::array< size_t,
CacheMetricType::NUM_METRIC_TYPE
metrics_
 

Detailed Description

Definition at line 69 of file DataRecycler.h.

Constructor & Destructor Documentation

CacheItemMetric::CacheItemMetric ( QueryPlanHash  query_plan_hash,
size_t  compute_time,
size_t  mem_size 
)
inline

Definition at line 71 of file DataRecycler.h.

72  : query_plan_hash_(query_plan_hash), metrics_({0, mem_size, compute_time}) {}
const QueryPlanHash query_plan_hash_
Definition: DataRecycler.h:106
std::array< size_t, CacheMetricType::NUM_METRIC_TYPE > metrics_
Definition: DataRecycler.h:107

Member Function Documentation

size_t CacheItemMetric::getComputeTime ( ) const
inline

Definition at line 80 of file DataRecycler.h.

References COMPUTE_TIME, and metrics_.

std::array< size_t, CacheMetricType::NUM_METRIC_TYPE > metrics_
Definition: DataRecycler.h:107
size_t CacheItemMetric::getMemSize ( ) const
inline

Definition at line 82 of file DataRecycler.h.

References MEM_SIZE, and metrics_.

std::array< size_t, CacheMetricType::NUM_METRIC_TYPE > metrics_
Definition: DataRecycler.h:107
const std::array<size_t, CacheMetricType::NUM_METRIC_TYPE>& CacheItemMetric::getMetrics ( ) const
inline

Definition at line 84 of file DataRecycler.h.

References metrics_.

84  {
85  return metrics_;
86  }
std::array< size_t, CacheMetricType::NUM_METRIC_TYPE > metrics_
Definition: DataRecycler.h:107
QueryPlanHash CacheItemMetric::getQueryPlanHash ( ) const
inline

Definition at line 74 of file DataRecycler.h.

References query_plan_hash_.

74 { return query_plan_hash_; }
const QueryPlanHash query_plan_hash_
Definition: DataRecycler.h:106
size_t CacheItemMetric::getRefCount ( ) const
inline

Definition at line 78 of file DataRecycler.h.

References metrics_, and REF_COUNT.

std::array< size_t, CacheMetricType::NUM_METRIC_TYPE > metrics_
Definition: DataRecycler.h:107
void CacheItemMetric::incRefCount ( )
inline

Definition at line 76 of file DataRecycler.h.

References metrics_, and REF_COUNT.

std::array< size_t, CacheMetricType::NUM_METRIC_TYPE > metrics_
Definition: DataRecycler.h:107
void CacheItemMetric::setComputeTime ( size_t  compute_time)
inline

Definition at line 88 of file DataRecycler.h.

References COMPUTE_TIME, and metrics_.

88  {
90  }
std::array< size_t, CacheMetricType::NUM_METRIC_TYPE > metrics_
Definition: DataRecycler.h:107
void CacheItemMetric::setMemSize ( const size_t  mem_size)
inline

Definition at line 92 of file DataRecycler.h.

References MEM_SIZE, and metrics_.

92  {
94  }
std::array< size_t, CacheMetricType::NUM_METRIC_TYPE > metrics_
Definition: DataRecycler.h:107
std::string CacheItemMetric::toString ( ) const
inline

Definition at line 96 of file DataRecycler.h.

References COMPUTE_TIME, MEM_SIZE, metrics_, query_plan_hash_, and REF_COUNT.

96  {
97  std::ostringstream oss;
98  oss << "Query plan hash: " << query_plan_hash_
99  << ", compute_time: " << metrics_[CacheMetricType::COMPUTE_TIME]
100  << ", mem_size: " << metrics_[CacheMetricType::MEM_SIZE]
101  << ", ref_count: " << metrics_[CacheMetricType::REF_COUNT];
102  return oss.str();
103  }
const QueryPlanHash query_plan_hash_
Definition: DataRecycler.h:106
std::array< size_t, CacheMetricType::NUM_METRIC_TYPE > metrics_
Definition: DataRecycler.h:107

Member Data Documentation

std::array<size_t, CacheMetricType::NUM_METRIC_TYPE> CacheItemMetric::metrics_
private
const QueryPlanHash CacheItemMetric::query_plan_hash_
private

Definition at line 106 of file DataRecycler.h.

Referenced by getQueryPlanHash(), and toString().


The documentation for this class was generated from the following file: