better mongostat output for dbs > 1tb

This commit is contained in:
Eliot Horowitz
2010-11-09 11:50:01 -05:00
parent c5f3d8fb82
commit b4f5ffa3a4

View File

@@ -153,6 +153,13 @@ namespace mongo {
unit = "g";
sz /= 1024;
}
if ( sz > 1024 ){
string s = str::stream() << (int)sz << unit;
_append( result , name , width , s );
return;
}
stringstream ss;
ss << setprecision(3) << sz << unit;
_append( result , name , width , ss.str() );