void AccessMetric::Aggregate(AbstractMetric &source) { PELOTON_ASSERT(source.GetType() == MetricType::ACCESS); auto access_metric = static_cast<AccessMetric &>(source); for (size_t i = 0; i < NUM_COUNTERS; ++i) { access_counters_[i].Aggregate( static_cast<CounterMetric &>(access_metric.GetAccessCounter(i))); } }
void TableMetric::Aggregate(AbstractMetric& source) { assert(source.GetType() == TABLE_METRIC); TableMetric& table_metric = static_cast<TableMetric&>(source); table_access_.Aggregate(table_metric.GetTableAccess()); }