OmniSciDB
a5dc49c757
|
#include <DataRecycler.h>
Public Member Functions | |
CacheMetricTracker (CacheItemType cache_item_type, size_t total_cache_size, size_t max_cache_item_size, int num_gpus=0) | |
std::vector< std::shared_ptr < CacheItemMetric > > & | getCacheItemMetrics (DeviceIdentifier device_identifier) |
std::shared_ptr< CacheItemMetric > | getCacheItemMetric (QueryPlanHash key, DeviceIdentifier device_identifier) const |
void | setCurrentCacheSize (DeviceIdentifier device_identifier, size_t bytes) |
std::optional< size_t > | getCurrentCacheSize (DeviceIdentifier key) const |
std::shared_ptr< CacheItemMetric > | putNewCacheItemMetric (QueryPlanHash key, DeviceIdentifier device_identifier, size_t mem_size, size_t compute_time) |
void | removeCacheItemMetric (QueryPlanHash key, DeviceIdentifier device_identifier) |
void | removeMetricFromBeginning (DeviceIdentifier device_identifier, int offset) |
size_t | calculateRequiredSpaceForItemAddition (DeviceIdentifier device_identifier, size_t item_size) const |
void | clearCacheMetricTracker () |
CacheAvailability | canAddItem (DeviceIdentifier device_identifier, size_t item_size) const |
void | updateCurrentCacheSize (DeviceIdentifier device_identifier, CacheUpdateAction action, size_t size) |
void | sortCacheInfoByQueryMetric (DeviceIdentifier device_identifier) |
std::string | toString () const |
size_t | getTotalCacheSize () const |
size_t | getMaxCacheItemSize () const |
void | setTotalCacheSize (size_t new_total_cache_size) |
void | setMaxCacheItemSize (size_t new_max_cache_item_size) |
Static Public Member Functions | |
static CacheMetricInfoMap::mapped_type::const_iterator | getCacheItemMetricItr (QueryPlanHash key, CacheMetricInfoMap::mapped_type const &metrics) |
static std::shared_ptr < CacheItemMetric > | getCacheItemMetricImpl (QueryPlanHash key, CacheMetricInfoMap::mapped_type const &metrics) |
Private Attributes | |
CacheItemType | item_type_ |
size_t | total_cache_size_ |
size_t | max_cache_item_size_ |
CacheMetricInfoMap | cache_metrics_ |
CacheSizeMap | current_cache_size_in_bytes_ |
Definition at line 183 of file DataRecycler.h.
|
inline |
Definition at line 185 of file DataRecycler.h.
References cache_metrics_, DataRecyclerUtil::CPU_DEVICE_IDENTIFIER, current_cache_size_in_bytes_, logger::INFO, LOG, and total_cache_size_.
|
inline |
Definition at line 307 of file DataRecycler.h.
References CHECK, CHECK_LE, current_cache_size_in_bytes_, and total_cache_size_.
|
inline |
Definition at line 333 of file DataRecycler.h.
References AVAILABLE, AVAILABLE_AFTER_CLEANUP, CHECK, getCurrentCacheSize(), max_cache_item_size_, total_cache_size_, and UNAVAILABLE.
|
inline |
Definition at line 317 of file DataRecycler.h.
References cache_metrics_, CHECK_EQ, current_cache_size_in_bytes_, getCacheItemMetrics(), getCurrentCacheSize(), item_type_, REMOVE, updateCurrentCacheSize(), and VLOG.
Referenced by ResultSetRecycler::clearCache(), and HashtableRecycler::clearCache().
|
inline |
Definition at line 243 of file DataRecycler.h.
References cache_metrics_, and getCacheItemMetricImpl().
|
inlinestatic |
Definition at line 229 of file DataRecycler.h.
References getCacheItemMetricItr().
Referenced by getCacheItemMetric(), and putNewCacheItemMetric().
|
inlinestatic |
Definition at line 222 of file DataRecycler.h.
Referenced by getCacheItemMetricImpl(), and removeCacheItemMetric().
|
inline |
Definition at line 236 of file DataRecycler.h.
References cache_metrics_, and CHECK.
Referenced by clearCacheMetricTracker(), removeCacheItemMetric(), removeMetricFromBeginning(), and sortCacheInfoByQueryMetric().
|
inline |
Definition at line 260 of file DataRecycler.h.
References current_cache_size_in_bytes_.
Referenced by canAddItem(), clearCacheMetricTracker(), and updateCurrentCacheSize().
|
inline |
|
inline |
|
inline |
Definition at line 269 of file DataRecycler.h.
References ADD, cache_metrics_, CHECK, getCacheItemMetricImpl(), REMOVE, removeCacheItemMetric(), and updateCurrentCacheSize().
|
inline |
Definition at line 294 of file DataRecycler.h.
References getCacheItemMetricItr(), and getCacheItemMetrics().
Referenced by putNewCacheItemMetric().
|
inline |
Definition at line 302 of file DataRecycler.h.
References getCacheItemMetrics().
|
inline |
Definition at line 251 of file DataRecycler.h.
References CHECK, current_cache_size_in_bytes_, and total_cache_size_.
Referenced by updateCurrentCacheSize().
|
inline |
Definition at line 401 of file DataRecycler.h.
References max_cache_item_size_.
Referenced by DataRecycler< std::optional< HashType >, EMPTY_META_INFO >::setMaxCacheItemSize().
|
inline |
Definition at line 396 of file DataRecycler.h.
References total_cache_size_.
Referenced by DataRecycler< std::optional< HashType >, EMPTY_META_INFO >::setTotalCacheSize().
|
inline |
Definition at line 368 of file DataRecycler.h.
References getCacheItemMetrics(), NUM_METRIC_TYPE, and gpu_enabled::sort().
|
inline |
Definition at line 385 of file DataRecycler.h.
References current_cache_size_in_bytes_.
|
inline |
Definition at line 354 of file DataRecycler.h.
References ADD, CHECK, CHECK_EQ, CHECK_LE, getCurrentCacheSize(), REMOVE, and setCurrentCacheSize().
Referenced by clearCacheMetricTracker(), and putNewCacheItemMetric().
|
private |
Definition at line 415 of file DataRecycler.h.
Referenced by CacheMetricTracker(), clearCacheMetricTracker(), getCacheItemMetric(), getCacheItemMetrics(), and putNewCacheItemMetric().
|
private |
Definition at line 418 of file DataRecycler.h.
Referenced by CacheMetricTracker(), calculateRequiredSpaceForItemAddition(), clearCacheMetricTracker(), getCurrentCacheSize(), setCurrentCacheSize(), and toString().
|
private |
Definition at line 408 of file DataRecycler.h.
Referenced by clearCacheMetricTracker().
|
private |
Definition at line 410 of file DataRecycler.h.
Referenced by canAddItem(), getMaxCacheItemSize(), and setMaxCacheItemSize().
|
private |
Definition at line 409 of file DataRecycler.h.
Referenced by CacheMetricTracker(), calculateRequiredSpaceForItemAddition(), canAddItem(), getTotalCacheSize(), setCurrentCacheSize(), and setTotalCacheSize().