@@ -195,7 +195,7 @@ class AllocatorMemoryTiersTest : public AllocatorTest<AllocatorT> {
195
195
const auto & mpStats = allocator->getPoolByTid (poolId, 0 ).getStats ();
196
196
// cache is 10MB should move about 1MB to reach 10% free
197
197
uint32_t approxEvict = (1024 *1024 )/mpStats.acStats .at (cid).allocSize ;
198
- while (stats.evictionStats .numMovedItems < approxEvict*0.95 && (1 -slabStats.usageFraction ()) >= 0.095 ) {
198
+ while (stats.evictionStats [ 0 ] .numMovedItems < approxEvict*0.95 && (1 -slabStats.usageFraction ()) >= 0.095 ) {
199
199
std::this_thread::sleep_for (std::chrono::seconds (1 ));
200
200
stats = allocator->getGlobalCacheStats ();
201
201
slabStats = allocator->getACStats (0 ,0 ,cid);
@@ -205,12 +205,14 @@ class AllocatorMemoryTiersTest : public AllocatorTest<AllocatorT> {
205
205
auto perclassEstats = allocator->getBackgroundMoverClassStats (MoverDir::Evict);
206
206
auto perclassPstats = allocator->getBackgroundMoverClassStats (MoverDir::Promote);
207
207
208
- ASSERT_GE (stats.evictionStats .numMovedItems ,1 );
209
- ASSERT_GE (stats.evictionStats .runCount ,1 );
210
- ASSERT_GE (stats.promotionStats .numMovedItems ,1 );
211
-
212
- ASSERT_GE (perclassEstats[0 ][0 ][cid], 1 );
213
- ASSERT_GE (perclassPstats[1 ][0 ][cid], 1 );
208
+ ASSERT_GE (stats.evictionStats [0 ].numMovedItems ,1 );
209
+ ASSERT_GE (stats.evictionStats [0 ].runCount ,1 );
210
+ ASSERT_GE (stats.promotionStats [0 ].numMovedItems ,1 );
211
+
212
+ MemoryDescriptorType tier0 (0 ,0 ,cid);
213
+ MemoryDescriptorType tier1 (1 ,0 ,cid);
214
+ ASSERT_GE (perclassEstats[tier0], 1 );
215
+ ASSERT_GE (perclassPstats[tier1], 1 );
214
216
215
217
}
216
218
0 commit comments