1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-06 02:15:48 +03:00

Remove trailing whitespace

This commit is contained in:
Ruben Bridgewater
2015-07-22 16:19:30 +02:00
parent a2bc597212
commit 6866ff9b1e
3 changed files with 8 additions and 8 deletions

View File

@@ -2,7 +2,7 @@
var source = new Buffer(100),
dest = new Buffer(100), i, j, k, tmp, count = 1000000, bytes = 100;
for (i = 99 ; i >= 0 ; i--) {
source[i] = 120;
}

View File

@@ -9,7 +9,7 @@ function print_results(obj) {
// build a map of all keys and their types
client.keys("*", function (err, all_keys) {
var key_types = {};
all_keys.forEach(function (key, pos) { // use second arg of forEach to get pos
client.type(key, function (err, type) {
key_types[key] = type;

View File

@@ -25,13 +25,13 @@ function lpad(input, len, chr) {
metrics.Histogram.prototype.print_line = function () {
var obj = this.printObj();
return lpad(obj.min, 4) + "/" + lpad(obj.max, 4) + "/" + lpad(obj.mean.toFixed(2), 7) + "/" + lpad(obj.p95.toFixed(2), 7);
};
function Test(args) {
this.args = args;
this.callback = null;
this.clients = [];
this.clients_ready = 0;
@@ -58,7 +58,7 @@ Test.prototype.run = function (callback) {
Test.prototype.new_client = function (id) {
var self = this, new_client;
new_client = redis.createClient(6379, "127.0.0.1", this.client_options);
new_client.create_time = Date.now();
@@ -97,7 +97,7 @@ Test.prototype.fill_pipeline = function () {
pipeline++;
this.send_next();
}
if (this.commands_completed === this.num_requests) {
this.print_stats();
this.stop_clients();
@@ -106,7 +106,7 @@ Test.prototype.fill_pipeline = function () {
Test.prototype.stop_clients = function () {
var self = this;
this.clients.forEach(function (client, pos) {
if (pos === self.clients.length - 1) {
client.quit(function (err, res) {
@@ -135,7 +135,7 @@ Test.prototype.send_next = function () {
Test.prototype.print_stats = function () {
var duration = Date.now() - this.test_start;
console.log("min/max/avg/p95: " + this.command_latency.print_line() + " " + lpad(duration, 6) + "ms total, " +
lpad((this.num_requests / (duration / 1000)).toFixed(2), 8) + " ops/sec");
};