0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-15 22:41:12 +01:00

modules/console: Improve db cache cmd output.

This commit is contained in:
Jason Volk 2018-09-03 03:50:12 -07:00
parent 6311739917
commit 63c3dbaaac

View file

@ -1358,7 +1358,7 @@ try
param.at(0)
};
const auto colname
auto colname
{
param[1]
};
@ -1377,16 +1377,34 @@ try
capacity > 0.0? (double(usage) / double(capacity)) : 0.0L
};
out << "(row cache) "
out << std::left
<< std::setw(16) << "ROW"
<< std::right
<< " "
<< std::setw(9) << "CACHED"
<< " "
<< std::setw(9) << "CAPACITY"
<< " "
<< std::setw(6) << " PCT"
<< " "
<< std::endl;
out << std::left
<< std::setw(16) << "*"
<< std::right
<< " "
<< std::setw(9) << usage
<< " "
<< std::setw(9) << capacity
<< " "
<< std::setw(6) << std::right << std::fixed << std::setprecision(2) << (usage_pct * 100)
<< "%"
<< std::endl
<< std::endl;
return true;
// Now set the colname to * so the column total branch is taken
// below and we output that line too.
colname = "*";
}
out << std::left