diff options
author | Eliot Horowitz <eliot@10gen.com> | 2009-10-15 11:26:51 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2009-10-15 11:26:51 -0400 |
commit | adfc0973c0e0a2f07e71c33b4cf7ccc3d1efc596 (patch) | |
tree | 362b96fa700214ea7c7daa4e597f86952c6b971b /shell/mr.js | |
parent | 415f55421992c2eb2b992974d9633eb50d74ab7f (diff) | |
download | mongo-adfc0973c0e0a2f07e71c33b4cf7ccc3d1efc596.tar.gz |
map/reduce cleaning
Diffstat (limited to 'shell/mr.js')
-rw-r--r-- | shell/mr.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/shell/mr.js b/shell/mr.js index 7e66fd14b6d..6f7ebd3fc68 100644 --- a/shell/mr.js +++ b/shell/mr.js @@ -7,6 +7,8 @@ MR.init = function(){ $arr = []; emit = MR.emit; $numEmits = 0; + $numReduces = 0; + $numReducesToDB = 0; gc(); // this is just so that keep memory size sane } @@ -28,6 +30,9 @@ MR.emit = function(k,v){ } MR.doReduce = function( useDB ){ + $numReduces++; + if ( useDB ) + $numReducesToDB++; $max = 0; for ( var i=0; i<$arr.length; i++){ var data = $arr[i]; |