Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix for helper function getChunkDistribution()
  • Loading branch information
gregs committed Nov 10, 2011
1 parent d42cf0d commit bc9d59f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions shell/collection.js
Expand Up @@ -727,11 +727,11 @@ DBCollection.prototype.getShardDistribution = function(){

var shardStats = stats.shards[ shard ]

var estDataPercent = Math.floor( shardStats.size / stats.size * 100 ) / 100
var estDocPercent = Math.floor( shardStats.count / stats.count * 100 ) / 100
var estDataPercent = Math.floor( shardStats.size / stats.size * 10000 ) / 100
var estDocPercent = Math.floor( shardStats.count / stats.count * 10000 ) / 100

print( " Shard " + shard + " data : " + estDataPercent + "%, docs : " + estDocPercent + "%" +
", avg obj size : " + sh._dataFormat( stats.shards[ shard ].avgObjSize ) )
print( " Shard " + shard + " contains " + estDataPercent + "% data, " + estDocPercent + "% docs in cluster, " +
"avg obj size on shard : " + sh._dataFormat( stats.shards[ shard ].avgObjSize ) )
}

print( "\n" )
Expand Down

0 comments on commit bc9d59f

Please sign in to comment.