@@ -36,6 +36,9 @@ struct BackgroundEvictionStats {
3636 // number of times we went executed the thread //TODO: is this def correct?
3737 uint64_t nTraversals{0 };
3838
39+ // number of classes searched
40+ uint64_t nClasses{0 };
41+
3942 // size of evicted items
4043 uint64_t evictionSize;
4144};
@@ -116,6 +119,8 @@ struct Stats {
116119 // what to populate since not all of those are interesting when running
117120 // cachebench.
118121 std::unordered_map<std::string, double > nvmCounters;
122+
123+ std::map<uint32_t , uint64_t > backgroundEvictionClasses;
119124
120125 // errors from the nvm engine.
121126 std::unordered_map<std::string, double > nvmErrors;
@@ -138,6 +143,8 @@ struct Stats {
138143 backgndEvicStats.nEvictedItemsFromSchedule ) << std::endl;
139144 out << folly::sformat (" Tier 0 Background Traversals : {:,}" ,
140145 backgndEvicStats.nTraversals ) << std::endl;
146+ out << folly::sformat (" Tier 0 Classes searched : {:,}" ,
147+ backgndEvicStats.nClasses ) << std::endl;
141148 out << folly::sformat (" Tier 0 Background Evicted Size : {:,}" ,
142149 backgndEvicStats.evictionSize ) << std::endl;
143150
@@ -298,6 +305,13 @@ struct Stats {
298305 out << it.first << " : " << it.second << std::endl;
299306 }
300307 }
308+
309+ if (!backgroundEvictionClasses.empty ()) {
310+ out << " == Class Background Eviction Counters Map ==" << std::endl;
311+ for (const auto & it : backgroundEvictionClasses) {
312+ out << it.first << " : " << it.second << std::endl;
313+ }
314+ }
301315
302316 if (numRamDestructorCalls > 0 || numNvmDestructorCalls > 0 ) {
303317 out << folly::sformat (" Destructor executed from RAM {}, from NVM {}" ,
0 commit comments