void RocksDBBlueFSVolumeSelector::dump(ostream& sout) {
auto max_x = per_level_per_dev_usage.get_max_x();
auto max_y = per_level_per_dev_usage.get_max_y();
- sout << "RocksDBBlueFSVolumeSelector: wal_total:" << l_totals[LEVEL_WAL - LEVEL_FIRST]
- << ", db_total:" << l_totals[LEVEL_DB - LEVEL_FIRST]
- << ", slow_total:" << l_totals[LEVEL_SLOW - LEVEL_FIRST]
- << ", db_avail:" << db_avail4slow << std::endl
- << "Usage matrix:" << std::endl;
+
+ sout << "RocksDBBlueFSVolumeSelector Usage Matrix:" << std::endl;
constexpr std::array<const char*, 8> names{ {
"DEV/LEV",
"WAL",
case LEVEL_SLOW:
sout << "SLOW"; break;
case LEVEL_MAX:
- sout << "TOTALS"; break;
+ sout << "TOTAL"; break;
}
for (size_t d = 0; d < max_x; d++) {
sout.setf(std::ios::left, std::ios::adjustfield);
case LEVEL_SLOW:
sout << "SLOW"; break;
case LEVEL_MAX:
- sout << "TOTALS"; break;
+ sout << "TOTAL"; break;
}
for (size_t d = 0; d < max_x - 1; d++) {
sout.setf(std::ios::left, std::ios::adjustfield);
sout.setf(std::ios::left, std::ios::adjustfield);
sout.width(width);
sout << stringify(byte_u_t(per_level_per_dev_max.at(max_x - 1, l)));
- if (l < max_y - 1) {
- sout << std::endl;
- }
+ sout << std::endl;
}
+ string sizes[] = {
+ ">> SIZE <<",
+ stringify(byte_u_t(l_totals[LEVEL_WAL - LEVEL_FIRST])),
+ stringify(byte_u_t(l_totals[LEVEL_DB - LEVEL_FIRST])),
+ stringify(byte_u_t(l_totals[LEVEL_SLOW - LEVEL_FIRST])),
+ };
+ for (size_t i = 0; i < (sizeof(sizes) / sizeof(sizes[0])); i++) {
+ sout.setf(std::ios::left, std::ios::adjustfield);
+ sout.width(width);
+ sout << sizes[i];
+ }
+ sout << std::endl;
}
// =======================================================