Skip to content

Commit

Permalink
better mongostat output for dbs > 1tb
Browse files Browse the repository at this point in the history
  • Loading branch information
erh committed Nov 9, 2010
1 parent c5f3d8f commit b4f5ffa
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tools/stat.cpp
Expand Up @@ -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() );
Expand Down

0 comments on commit b4f5ffa

Please sign in to comment.