diff options
author | Greg Studer <greg@10gen.com> | 2013-02-01 11:19:43 -0500 |
---|---|---|
committer | Dan Pasette <dan@10gen.com> | 2013-03-20 17:58:06 -0400 |
commit | b80968f10ce72f4830ed7c7b1592611dc160f5c1 (patch) | |
tree | f65e6aaf3e724db0a76f39dfb594691317b26367 | |
parent | 2048a8099765766aa772592ecb0e5a6d54530287 (diff) | |
download | mongo-b80968f10ce72f4830ed7c7b1592611dc160f5c1.tar.gz |
SERVER-8167 make units more accurate
-rw-r--r-- | src/mongo/shell/collection.js | 4 | ||||
-rw-r--r-- | src/mongo/shell/utils_sh.js | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/mongo/shell/collection.js b/src/mongo/shell/collection.js index b3b2dace6ae..8c75f5691dd 100644 --- a/src/mongo/shell/collection.js +++ b/src/mongo/shell/collection.js @@ -782,10 +782,10 @@ DBCollection.prototype.getSplitKeysForChunks = function( chunkSize ){ if( ! chunkSize ){ chunkSize = config.settings.findOne({ _id : "chunksize" }).value - print( "Chunk size not set, using default of " + chunkSize + "Mb" ) + print( "Chunk size not set, using default of " + chunkSize + "MB" ) } else{ - print( "Using chunk size of " + chunkSize + "Mb" ) + print( "Using chunk size of " + chunkSize + "MB" ) } var shardDocs = config.shards.find().toArray() diff --git a/src/mongo/shell/utils_sh.js b/src/mongo/shell/utils_sh.js index 9d1b3a47822..990f4d24b85 100644 --- a/src/mongo/shell/utils_sh.js +++ b/src/mongo/shell/utils_sh.js @@ -17,10 +17,10 @@ sh._adminCommand = function( cmd , skipCheck ) { } sh._dataFormat = function( bytes ){ - if( bytes < 1024 ) return Math.floor( bytes ) + "b" - if( bytes < 1024 * 1024 ) return Math.floor( bytes / 1024 ) + "kb" - if( bytes < 1024 * 1024 * 1024 ) return Math.floor( ( Math.floor( bytes / 1024 ) / 1024 ) * 100 ) / 100 + "Mb" - return Math.floor( ( Math.floor( bytes / ( 1024 * 1024 ) ) / 1024 ) * 100 ) / 100 + "Gb" + if( bytes < 1024 ) return Math.floor( bytes ) + "B" + if( bytes < 1024 * 1024 ) return Math.floor( bytes / 1024 ) + "KiB" + if( bytes < 1024 * 1024 * 1024 ) return Math.floor( ( Math.floor( bytes / 1024 ) / 1024 ) * 100 ) / 100 + "MiB" + return Math.floor( ( Math.floor( bytes / ( 1024 * 1024 ) ) / 1024 ) * 100 ) / 100 + "GiB" } sh._collRE = function( coll ){ |