Skip to content

Commit

Permalink
Merge pull request #274 from aerospike/standard-v12
Browse files Browse the repository at this point in the history
Update standard package to v12
  • Loading branch information
jhecking authored Feb 20, 2019
2 parents f06c5f9 + 18a381d commit ff852de
Show file tree
Hide file tree
Showing 40 changed files with 753 additions and 881 deletions.
4 changes: 2 additions & 2 deletions benchmarks/alerts.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// *****************************************************************************
// Copyright 2013-2017 Aerospike, Inc.
// Copyright 2013-2019 Aerospike, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License")
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -51,7 +51,7 @@ function setupAlertSystem (alert) {
} else {
winston = require('winston')
if (alert.mode === 'FILE') {
winston.add(winston.transports.file, {filename: alert.filename})
winston.add(winston.transports.file, { filename: alert.filename })
winston.remove(winston.transports.Console)
}
alertMode = alert.mode
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// *****************************************************************************
// Copyright 2013-2017 Aerospike, Inc.
// Copyright 2013-2019 Aerospike, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License")
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -77,7 +77,7 @@ if (argv.time !== undefined) {
argv.iterations = undefined
}

var alert = {mode: argv.alert, filename: argv.filename}
var alert = { mode: argv.alert, filename: argv.filename }
alerts.setupAlertSystem(alert)

// *****************************************************************************
Expand Down
24 changes: 12 additions & 12 deletions benchmarks/stats.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// *****************************************************************************
// Copyright 2013-2017 Aerospike, Inc.
// Copyright 2013-2019 Aerospike, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License")
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -167,8 +167,8 @@ function printEnvTable (print, prefix) {
style: TABLE_STYLE
})

envTable.push({'Node.js Version': process.versions.node})
envTable.push({'UV_THREADPOOL_SIZE': process.env.UV_THREADPOOL_SIZE || '-'})
envTable.push({ 'Node.js Version': process.versions.node })
envTable.push({ 'UV_THREADPOOL_SIZE': process.env.UV_THREADPOOL_SIZE || '-' })

printTable(envTable, print, prefix)
}
Expand All @@ -179,11 +179,11 @@ function printConfigTable (config, print, prefix) {
style: TABLE_STYLE
})

configTable.push({'operations': config.operations})
configTable.push({'iterations': config.iterations === undefined ? 'undefined' : config.iterations})
configTable.push({'processes': config.processes})
configTable.push({'promises': !!config.promises})
configTable.push({'time': config.time === undefined ? 'undefined' : timeUnits(config.time)})
configTable.push({ 'operations': config.operations })
configTable.push({ 'iterations': config.iterations === undefined ? 'undefined' : config.iterations })
configTable.push({ 'processes': config.processes })
configTable.push({ 'promises': !!config.promises })
configTable.push({ 'time': config.time === undefined ? 'undefined' : timeUnits(config.time) })

printTable(configTable, print, prefix)
}
Expand All @@ -205,22 +205,22 @@ function printTransactions (transactions, print, prefix) {
var row = columns.map(function (col) {
return numberFormat(transactions[col]['count'], 0)
})
table.push({'Total': row})
table.push({ 'Total': row })

row = columns.map(function (col) {
return numberFormat(transactions[col]['tps'], 0)
})
table.push({'TPS': row})
table.push({ 'TPS': row })

row = columns.map(function (col) {
return numberFormat(transactions[col]['min_tps'], 0)
})
table.push({'Min TPS': row})
table.push({ 'Min TPS': row })

row = columns.map(function (col) {
return numberFormat(transactions[col]['max_tps'], 0)
})
table.push({'Max TPS': row})
table.push({ 'Max TPS': row })

printTable(table, print, prefix)
}
Expand Down
8 changes: 4 additions & 4 deletions benchmarks/worker.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// *****************************************************************************
// Copyright 2013-2017 Aerospike, Inc.
// Copyright 2013-2019 Aerospike, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License")
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -88,7 +88,7 @@ let config = {
}

if (argv.host) {
config.hosts = [{addr: argv.host, port: argv.port || 3000}]
config.hosts = [{ addr: argv.host, port: argv.port || 3000 }]
}

if (argv.user !== null) {
Expand Down Expand Up @@ -233,9 +233,9 @@ function run (options) {

while (writeOps > 0 || readOps > 0) {
var k = keygen(options.keyRange.min, options.keyRange.max)
var key = {ns: options.namespace, set: options.set, key: k}
var key = { ns: options.namespace, set: options.set, key: k }
var record = recordgen(k, options.binSpec)
var ops = {key: key, record: record}
var ops = { key: key, record: record }
if (writeOps > 0) {
writeOps--
if (usePromises) {
Expand Down
2 changes: 1 addition & 1 deletion lib/client.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// *****************************************************************************
// Copyright 2013-2018 Aerospike, Inc.
// Copyright 2013-2019 Aerospike, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License")
// you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions lib/error.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// *****************************************************************************
// Copyright 2013-2018 Aerospike, Inc.
// Copyright 2013-2019 Aerospike, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License")
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -137,7 +137,7 @@ class AerospikeError extends Error {
setStackTrace (stack) {
let firstLine = `${this.name}: ${this.message}`
stack = stack.replace(/^.*$/m, firstLine)
Object.defineProperty(this, 'stack', {value: stack})
Object.defineProperty(this, 'stack', { value: stack })
}

/**
Expand Down
8 changes: 4 additions & 4 deletions lib/geojson.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// *****************************************************************************
// Copyright 2013-2017 Aerospike, Inc.
// Copyright 2013-2019 Aerospike, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License")
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -84,7 +84,7 @@ function GeoJSON (json) {
* let point = GeoJSON.Point(103.913, 1.308)
*/
GeoJSON.Point = function (lng, lat) {
return new GeoJSON({type: 'Point', coordinates: [lng, lat]})
return new GeoJSON({ type: 'Point', coordinates: [lng, lat] })
}

/**
Expand All @@ -106,7 +106,7 @@ GeoJSON.Point = function (lng, lat) {
*/
GeoJSON.Polygon = function (coordinates) {
coordinates = Array.prototype.slice.call(arguments)
return new GeoJSON({type: 'Polygon', coordinates: [coordinates]})
return new GeoJSON({ type: 'Polygon', coordinates: [coordinates] })
}

/**
Expand All @@ -130,7 +130,7 @@ GeoJSON.Polygon = function (coordinates) {
* let point = GeoJSON.Circle(103.913, 1.308, 5000)
*/
GeoJSON.Circle = function (lng, lat, radius) {
return new GeoJSON({type: 'AeroCircle', coordinates: [[lng, lat], radius]})
return new GeoJSON({ type: 'AeroCircle', coordinates: [[lng, lat], radius] })
}

/**
Expand Down
Loading

0 comments on commit ff852de

Please sign in to comment.