Skip to content

Incorrect stats #14

@martinj

Description

@martinj

The fix for #6 seems to cause another case of incorrect stats.

For illustration

const els = require('event-loop-stats');
const express = require('express')
const app = express()
const port = 3000

app.get('/', (req, res) => {
  res.send('Hello World!')
})

app.listen(port, () => {
  console.log(`Example app listening at http://localhost:${port}`)
})

setInterval(() => {
  console.log(els.sense());
}, 10000)

Gives the following output

Example app listening at http://localhost:3000
{ min: 0, max: 8104, num: 16, sum: 10000 }
{ min: 10003, max: 10003, num: 1, sum: 10003 }
{ min: 10003, max: 10003, num: 1, sum: 10003 }
{ min: 10002, max: 10002, num: 1, sum: 10002 }
{ min: 10005, max: 10005, num: 1, sum: 10005 }
{ min: 10005, max: 10005, num: 1, sum: 10005 }
{ min: 10005, max: 10005, num: 1, sum: 10005 }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions