![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Live state of one Cache node. More...
#include <line/solvers/ldes/ldes_cache.h>
Classes | |
| struct | HeldRequest |
| A request parked while its item was being fetched. More... | |
Public Member Functions | |
| int | fetches_item (std::size_t cls) const |
| The item cls fetches, or -1. | |
| std::size_t | retrieval_of (std::size_t item, std::size_t cls) const |
| The retrieval class of item for access class cls, or 0. | |
| int | find (std::size_t item) const |
| The list holding item, or -1. | |
| double | list_cost (std::size_t l) const |
| double | cap_of (std::size_t l) const |
| bool | capped () const |
| double | size_of (std::size_t item) const |
Public Attributes | |
| std::size_t | node = 0 |
| std::size_t | nitems = 0 |
| lang::ReplacementStrategy | policy = lang::ReplacementStrategy::LRU |
| double | qlru = 1.0 |
| q-LRU admission probability on a miss | |
| std::vector< std::size_t > | capacity |
| per list | |
| std::vector< std::list< std::size_t > > | lists |
| per list, most recent at the front | |
| std::vector< double > | item_size |
| empty = unconstrained | |
| std::vector< double > | cost_cap |
| empty = unconstrained | |
| std::vector< std::vector< double > > | popularity |
| Per access class: the item popularity, as a cumulative law. | |
| std::vector< int > | hit_class |
| std::vector< int > | miss_class |
| 0-based destination class, -1 = unset | |
| std::vector< double > | hits |
| std::vector< double > | misses |
| per access class | |
| bool | has_retrieval = false |
| Cache.setRetrievalSystem: a miss FETCHES the item through a sub-network instead of being served at once, and a second request for an item already in flight is parked rather than starting a fetch of its own. | |
| std::vector< std::vector< std::size_t > > | retrieval_class |
| (nitems x nclasses) the per-item retrieval class, 0 = none. | |
| std::vector< int > | retrieval_class_to_item |
| Per class: the item it fetches, or -1 when it is not a retrieval class. | |
| std::vector< char > | in_flight |
| per item, a fetch is outstanding | |
| std::vector< double > | fetch_start |
| per item, when that fetch began | |
| std::vector< std::vector< HeldRequest > > | held |
| per item | |
| std::vector< double > | delayed |
| per access class, delayed-hit count | |
| double | delayed_wait = 0.0 |
| summed parked time over all releases | |
| double | total_fetch_time = 0.0 |
| summed fetch duration | |
| double | completed_fetches = 0.0 |
Live state of one Cache node.
Definition at line 44 of file ldes_cache.h.
|
inline |
Definition at line 114 of file ldes_cache.h.
References cost_cap.
Referenced by line::ldes::engine::cache_hit(), and line::ldes::engine::cache_miss().
|
inline |
Definition at line 117 of file ldes_cache.h.
References cost_cap, and item_size.
Referenced by line::ldes::engine::cache_hit(), and line::ldes::engine::cache_miss().
|
inline |
The item cls fetches, or -1.
Definition at line 91 of file ldes_cache.h.
References retrieval_class_to_item.
|
inline |
|
inline |
Definition at line 108 of file ldes_cache.h.
References item_size, and lists.
Referenced by line::ldes::engine::cache_hit(), and line::ldes::engine::cache_miss().
|
inline |
The retrieval class of item for access class cls, or 0.
Definition at line 95 of file ldes_cache.h.
References retrieval_class.
|
inline |
Definition at line 118 of file ldes_cache.h.
References item_size.
Referenced by line::ldes::engine::cache_hit(), and line::ldes::engine::cache_miss().
| std::vector<std::size_t> line::ldes::engine::CacheState::capacity |
per list
Definition at line 49 of file ldes_cache.h.
Referenced by line::ldes::engine::cache_hit(), and line::ldes::engine::cache_miss().
| double line::ldes::engine::CacheState::completed_fetches = 0.0 |
Definition at line 88 of file ldes_cache.h.
| std::vector<double> line::ldes::engine::CacheState::cost_cap |
empty = unconstrained
Definition at line 52 of file ldes_cache.h.
| std::vector<double> line::ldes::engine::CacheState::delayed |
per access class, delayed-hit count
Definition at line 85 of file ldes_cache.h.
| double line::ldes::engine::CacheState::delayed_wait = 0.0 |
summed parked time over all releases
Definition at line 86 of file ldes_cache.h.
| std::vector<double> line::ldes::engine::CacheState::fetch_start |
per item, when that fetch began
Definition at line 75 of file ldes_cache.h.
| bool line::ldes::engine::CacheState::has_retrieval = false |
Cache.setRetrievalSystem: a miss FETCHES the item through a sub-network instead of being served at once, and a second request for an item already in flight is parked rather than starting a fetch of its own.
It is released when the fetch returns, and counted as a DELAYED HIT: it neither hit nor missed, and folding it into either loses the whole effect the model exists to measure.
Definition at line 69 of file ldes_cache.h.
| std::vector<std::vector<HeldRequest> > line::ldes::engine::CacheState::held |
per item
Definition at line 83 of file ldes_cache.h.
| std::vector<int> line::ldes::engine::CacheState::hit_class |
Definition at line 55 of file ldes_cache.h.
| std::vector<double> line::ldes::engine::CacheState::hits |
Definition at line 58 of file ldes_cache.h.
| std::vector<char> line::ldes::engine::CacheState::in_flight |
per item, a fetch is outstanding
Definition at line 74 of file ldes_cache.h.
| std::vector<double> line::ldes::engine::CacheState::item_size |
empty = unconstrained
Definition at line 51 of file ldes_cache.h.
Referenced by capped(), list_cost(), and size_of().
| std::vector<std::list<std::size_t> > line::ldes::engine::CacheState::lists |
per list, most recent at the front
Definition at line 50 of file ldes_cache.h.
Referenced by line::ldes::engine::cache_hit(), line::ldes::engine::cache_miss(), find(), and list_cost().
| std::vector<int> line::ldes::engine::CacheState::miss_class |
0-based destination class, -1 = unset
Definition at line 55 of file ldes_cache.h.
| std::vector<double> line::ldes::engine::CacheState::misses |
per access class
Definition at line 58 of file ldes_cache.h.
| std::size_t line::ldes::engine::CacheState::nitems = 0 |
Definition at line 46 of file ldes_cache.h.
| std::size_t line::ldes::engine::CacheState::node = 0 |
Definition at line 45 of file ldes_cache.h.
| lang::ReplacementStrategy line::ldes::engine::CacheState::policy = lang::ReplacementStrategy::LRU |
Definition at line 47 of file ldes_cache.h.
Referenced by line::ldes::engine::cache_hit(), and line::ldes::engine::cache_miss().
| std::vector<std::vector<double> > line::ldes::engine::CacheState::popularity |
Per access class: the item popularity, as a cumulative law.
Definition at line 54 of file ldes_cache.h.
| double line::ldes::engine::CacheState::qlru = 1.0 |
q-LRU admission probability on a miss
Definition at line 48 of file ldes_cache.h.
Referenced by line::ldes::engine::cache_miss().
| std::vector<std::vector<std::size_t> > line::ldes::engine::CacheState::retrieval_class |
(nitems x nclasses) the per-item retrieval class, 0 = none.
1-based.
Definition at line 71 of file ldes_cache.h.
Referenced by retrieval_of().
| std::vector<int> line::ldes::engine::CacheState::retrieval_class_to_item |
Per class: the item it fetches, or -1 when it is not a retrieval class.
Definition at line 73 of file ldes_cache.h.
Referenced by fetches_item().
| double line::ldes::engine::CacheState::total_fetch_time = 0.0 |
summed fetch duration
Definition at line 87 of file ldes_cache.h.