Skip to content

Commit

Permalink
Forgot code style.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanpoeter committed Nov 26, 2016
1 parent 548a008 commit 95f34ba
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions test/heap-test-coils.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,17 @@ const client = modbus.client.tcp.complete({
client.connect()

client.on('connect', function () {

let p = Promise.resolve()
let p = Promise.resolve()

for (let i = 1; i < 1e5; i++) {
p = p.then(client.readCoils(0, 13))
}

p.then(function () {

let usedHeapSize = Math.floor(v8.getHeapStatistics().used_heap_size / 1e6);
let usedHeapSize = Math.floor(v8.getHeapStatistics().used_heap_size / 1e6)

console.log('Heap:', usedHeapSize, 'MB')

client.close()

client.close()
})

})

0 comments on commit 95f34ba

Please sign in to comment.