Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

SERVER-8167 make units more accurate

  • Loading branch information...
commit b80968f10ce72f4830ed7c7b1592611dc160f5c1 1 parent 2048a80
Greg Studer authored monkey101 committed
Showing with 6 additions and 6 deletions.
  1. +2 −2 src/mongo/shell/collection.js
  2. +4 −4 src/mongo/shell/utils_sh.js
View
4 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()
View
8 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 ){
Please sign in to comment.
Something went wrong with that request. Please try again.