{"name":"speedometer","version":"0.1.2","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"},"_id":"speedometer@0.1.2","dist":{"shasum":"1c1a93e7846de8b5d3c9447b1976aa0a5462ff48","tarball":"http://registry-npm.ywwl.com/speedometer/download/speedometer-0.1.2.tgz","integrity":"sha512-f6xGw3yJRp4Kls1CXeGIq7W1Nw/NXZHfVIqAN6s94gF3z5hu6hwdUFHhLP8LlBKkFI6yX53zmEueZlgyRCGyFw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCIuU/m7t2XU0DB1sCh1FD7xUzdGE71iAGsKMAb3dNghAIhAIYCU9VpCVSAPzZcQfiJTeXVRqIRY2KEnqxlxvrnL7OT"}],"size":1198,"noattachment":false,"key":"/speedometer/-/speedometer-0.1.2.tgz"},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"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":1374347163883,"_cnpm_publish_time":1374347163883,"dist-tags":{"latest":"1.1.0"}}