@@ -27,7 +27,7 @@ var basicTimestampGenerator = {
2727 current : function ( ) {
2828 return new Date ( ) . getTime ( ) ;
2929 } ,
30-
30+
3131 duration : function ( start , end ) {
3232 return end - start ;
3333 }
@@ -59,7 +59,7 @@ var Instrumentation = function(core, options, callback) {
5959 var instrumentations = [ ]
6060
6161 // Classes to support
62- var classes = [ GridStore , OrderedBulkOperation , UnorderedBulkOperation ,
62+ var classes = [ GridStore , OrderedBulkOperation , UnorderedBulkOperation ,
6363 CommandCursor , AggregationCursor , Cursor , Collection , Db ] ;
6464
6565 // Add instrumentations to the available list
@@ -165,7 +165,7 @@ var Instrumentation = function(core, options, callback) {
165165 commandObj . ordered = options . ordered != undefined ? options . ordered : true ;
166166 } else if ( x == 'insert' || x == 'update' || x == 'remove' && this . lastIsMaster ( ) . maxWireVersion >= 2 ) {
167167 // Skip the insert/update/remove commands as they are executed as actual write commands in 2.6 or higher
168- return func . apply ( this , args ) ;
168+ return func . apply ( this , args ) ;
169169 }
170170
171171 // Get the callback
@@ -176,7 +176,7 @@ var Instrumentation = function(core, options, callback) {
176176
177177 // Get a connection reference for this server instance
178178 var connection = this . s . pool . get ( )
179-
179+
180180 // Emit the start event for the command
181181 var command = {
182182 // Returns the command.
@@ -229,7 +229,7 @@ var Instrumentation = function(core, options, callback) {
229229 }
230230
231231 self . emit ( 'failed' , command ) ;
232- } else if ( commandObj && commandObj . writeConcern
232+ } else if ( commandObj && commandObj . writeConcern
233233 && commandObj . writeConcern . w == 0 ) {
234234 // If we have write concern 0
235235 command . reply = { ok :1 } ;
@@ -425,7 +425,7 @@ var Instrumentation = function(core, options, callback) {
425425
426426 // Set up the connection
427427 var connectionId = null ;
428-
428+
429429 // Set local connection
430430 if ( this . connection ) connectionId = this . connection ;
431431 if ( ! connectionId && this . server && this . server . getConnection ) connectionId = this . server . getConnection ( ) ;
@@ -465,8 +465,8 @@ var Instrumentation = function(core, options, callback) {
465465 self . emit ( 'started' , command )
466466
467467 // Emit succeeded event with killcursor if we have a legacy protocol
468- if ( command . commandName == 'killCursors'
469- && this . server . lastIsMaster ( )
468+ if ( command . commandName == 'killCursors'
469+ && this . server . lastIsMaster ( )
470470 && this . server . lastIsMaster ( ) . maxWireVersion < 4 ) {
471471 // Emit the succeeded command
472472 var command = {
@@ -497,7 +497,6 @@ var Instrumentation = function(core, options, callback) {
497497 // Emit the command
498498 self . emit ( 'failed' , command )
499499 } else {
500-
501500 // Do we have a getMore
502501 if ( commandName . toLowerCase ( ) == 'getmore' && r == null ) {
503502 r = {
@@ -517,7 +516,7 @@ var Instrumentation = function(core, options, callback) {
517516 }
518517 } else if ( commandName . toLowerCase ( ) == 'killcursors' && r == null ) {
519518 r = {
520- cursorsUnknown :[ cursor . cursorState . lastCursorId ] ,
519+ cursorsUnknown :[ cursor . cursorState . lastCursorId ] ,
521520 ok :1
522521 }
523522 }
@@ -538,7 +537,7 @@ var Instrumentation = function(core, options, callback) {
538537
539538 // Return
540539 if ( ! callback ) return ;
541-
540+
542541 // Return to caller
543542 callback ( err , r ) ;
544543 } ) ;
@@ -605,4 +604,4 @@ Instrumentation.prototype.uninstrument = function() {
605604 this . removeAllListeners ( 'failed' ) ;
606605}
607606
608- module . exports = Instrumentation ;
607+ module . exports = Instrumentation ;
0 commit comments