Expected output when restarting Kuzzle backend:
node recover.js
connected
logged
Kuzzle time: 1661845705110
disconnected
reconnected
Expected output when restarting Kuzzle backend:
node recover.js
connected
logged
Kuzzle time: 1661845705110
disconnected
reconnected
Install dependencies npm i @octokit/rest
Generate a Github Personnal Token (starts with ghp_
) and insert it in the script.
Choose the source repository and insert it in the script (e.g. kuzzleio/kuzzle
)
Run the script: node copy-labels.js kuzzleio/koncorde
npm i benchmark
results
simple function call x 962,129 ops/sec ±2.62% (79 runs sampled)
object function call x 900,959 ops/sec ±2.13% (89 runs sampled)
Fastest is simple function call
Around 0.1 ms for 1000 calls
Immutability has a cost, here is how much
object - vanilla immutable x 903,841 ops/sec ±5.33% (77 runs sampled)
object - immutable.js x 1,672,774 ops/sec ±1.68% (89 runs sampled)
object - mutable x 546,235,424 ops/sec ±0.84% (83 runs sampled)
array - vanilla immutable x 4,855,761 ops/sec ±1.55% (91 runs sampled)
array - immutable.js x 618,146 ops/sec ±3.56% (85 runs sampled)
array - mutable x 9,849,954 ops/sec ±4.00% (85 runs sampled)
const {Benchmark} = require('benchmark'); | |
var suite = new Benchmark.Suite; | |
const justClone = require('just-clone'); | |
const fastClone = require('fast-clone'); | |
const lodashClone = require('lodash').cloneDeep; | |
const stringifyParse = o => JSON.parse(JSON.stringify(o)); | |
const smallObject = { | |
name: 'Aschen', |
This is a standalone migration script to export and imports Elasticsearch Stored Scripts.
Export scripts from your ES cluster:
node migrate.js export http://localhost:9200
/** | |
$ node node/reflect.js | |
Reflect x 3,102,490 ops/sec ±5.31% (78 runs sampled) | |
Normal x 61,204,978 ops/sec ±5.73% (86 runs sampled) | |
Fastest is Normal | |
*/ | |
const {Benchmark} = require('benchmark'); | |
var suite = new Benchmark.Suite; |
const {Benchmark} = require('benchmark'); | |
var suite = new Benchmark.Suite; | |
function monomorphic (person) { | |
const array = []; | |
for (let i = 10; i--; ) { | |
array.push(person.age * i); | |
} |
Usage:
redis-cli --eval clean-keys.lua <mode> <days>
redis-cli --eval clean-keys.lua count 1
redis-cli --eval clean-keys.lua print 1
redis-cli --eval clean-keys.lua delete 1
For example, redis-cli --eval clean-keys.lua count 2
will return the number of keys expiring in more than 2 days