So siehts ganz gut aus !

This commit is contained in:
2019-04-03 17:44:16 +02:00
parent 3695b33c83
commit 0fe884c90a
6758 changed files with 530485 additions and 65 deletions

29
node_modules/mqtt-packet/benchmarks/generate.js generated vendored Normal file
View File

@@ -0,0 +1,29 @@
'use strict'
var mqtt = require('../')
var max = 100000
var i
var buf = Buffer.from('test')
// initialize it
mqtt.generate({
cmd: 'publish',
topic: 'test',
payload: buf
})
var start = Date.now()
var time
for (i = 0; i < max; i++) {
mqtt.generate({
cmd: 'publish',
topic: 'test',
payload: buf
})
}
time = Date.now() - start
console.log('Total time', time)
console.log('Total packets', max)
console.log('Packet/s', max / time * 1000)