{"name":"speedometer","version":"0.1.3","repository":{"type":"git","url":"git://github.com/mafintosh/speedometer"},"description":"simple speed measurement in javascript","keywords":["speed","bytes","per","second","transfer"],"author":{"name":"Mathias Buus Madsen","email":"mathiasbuus@gmail.com"},"bugs":{"url":"https://github.com/mafintosh/speedometer/issues"},"homepage":"https://github.com/mafintosh/speedometer","_id":"speedometer@0.1.3","_shasum":"90a4540e5efe50811b43f6308235c23555262047","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"dist":{"shasum":"90a4540e5efe50811b43f6308235c23555262047","tarball":"http://registry-npm.ywwl.com/speedometer/download/speedometer-0.1.3.tgz","integrity":"sha512-DnYFZlekzguAmW31pUet/3XtyS+6/9B0pj0dhaajNVj700gkI+BWazkGKWaVck526Oqojv4XKSa3uYF6SLXSfA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICn3pjB9Sc3wVjPoopohWiLHhkLwN1GXe/hz+D5+Bj+aAiEAn35TnzvS2sjq3BSMvnWlCwD3G1AMcyRlz9VqSdtK9+I="}],"size":1755,"noattachment":false,"key":"/speedometer/-/speedometer-0.1.3.tgz"},"directories":{},"readme":"# speedometer\n\nSpeed measurement in Javascript\n\n```\nnpm install speedometer\n```\n\n## Usage\n\n``` js\nvar speedometer = require('speedometer')\nvar fs = require('fs')\n\n// Let's measure how fast we can read from /dev/urandom\nvar speed = speedometer()\nvar stream = fs.createReadStream('/dev/urandom')\n\nstream.on('data', function(data) {\n  // Simply call speed with the amount of bytes transferred\n  var bytesPerSecond = speed(data.length)\n\n  console.log(bytesPerSecond+' bytes/second')\n})\n```\n\nYou can always get the current speed by calling `speed()`.\n\nPer default `speedometer` uses a 5 second buffer.\nTo change this simply pass another value to the constructor\n\n``` js\nvar speed = speedometer(20) // uses a 20s buffer instead\n```\n\n## License\n\nMIT\n","publish_time":1404156940910,"_cnpm_publish_time":1404156940910,"dist-tags":{"latest":"1.1.0"}}