@@ -25,13 +25,13 @@ function lpad(input, len, chr) {
2525
2626metrics . Histogram . prototype . print_line = function ( ) {
2727 var obj = this . printObj ( ) ;
28-
28+
2929 return lpad ( obj . min , 4 ) + "/" + lpad ( obj . max , 4 ) + "/" + lpad ( obj . mean . toFixed ( 2 ) , 7 ) + "/" + lpad ( obj . p95 . toFixed ( 2 ) , 7 ) ;
3030} ;
3131
3232function Test ( args ) {
3333 this . args = args ;
34-
34+
3535 this . callback = null ;
3636 this . clients = [ ] ;
3737 this . clients_ready = 0 ;
@@ -58,7 +58,7 @@ Test.prototype.run = function (callback) {
5858
5959Test . prototype . new_client = function ( id ) {
6060 var self = this , new_client ;
61-
61+
6262 new_client = redis . createClient ( 6379 , "127.0.0.1" , this . client_options ) ;
6363 new_client . create_time = Date . now ( ) ;
6464
@@ -97,7 +97,7 @@ Test.prototype.fill_pipeline = function () {
9797 pipeline ++ ;
9898 this . send_next ( ) ;
9999 }
100-
100+
101101 if ( this . commands_completed === this . num_requests ) {
102102 this . print_stats ( ) ;
103103 this . stop_clients ( ) ;
@@ -106,7 +106,7 @@ Test.prototype.fill_pipeline = function () {
106106
107107Test . prototype . stop_clients = function ( ) {
108108 var self = this ;
109-
109+
110110 this . clients . forEach ( function ( client , pos ) {
111111 if ( pos === self . clients . length - 1 ) {
112112 client . quit ( function ( err , res ) {
@@ -135,7 +135,7 @@ Test.prototype.send_next = function () {
135135
136136Test . prototype . print_stats = function ( ) {
137137 var duration = Date . now ( ) - this . test_start ;
138-
138+
139139 console . log ( "min/max/avg/p95: " + this . command_latency . print_line ( ) + " " + lpad ( duration , 6 ) + "ms total, " +
140140 lpad ( ( this . num_requests / ( duration / 1000 ) ) . toFixed ( 2 ) , 8 ) + " ops/sec" ) ;
141141} ;
0 commit comments