{"name":"speedometer","version":"0.1.4","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"},"gitHead":"0771a135bad8a8a7d31770ff2e7a29000e2ce5a1","bugs":{"url":"https://github.com/mafintosh/speedometer/issues"},"homepage":"https://github.com/mafintosh/speedometer","_id":"speedometer@0.1.4","scripts":{},"_shasum":"9876dbd2a169d3115402d48e6ea6329c8816a50d","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"maintainers":[{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"dist":{"shasum":"9876dbd2a169d3115402d48e6ea6329c8816a50d","tarball":"http://registry-npm.ywwl.com/speedometer/download/speedometer-0.1.4.tgz","integrity":"sha512-phdEoDlA6EUIVtzwq1UiNMXDUogczp204aYF/yfOhjNePWFfIpBJ1k5wLMuXQhEOOMjuTJEcc4vdZa+vuP+n/Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD0avuI4OglLFQHC+YmJIHxwwfGrWq3liHtpeqJkRw41gIgIuuFSYKR6bJYsDJiBr/1rLupJsmMS4QC+gNwHR8olnw="}],"size":1737,"noattachment":false,"key":"/speedometer/-/speedometer-0.1.4.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":1419414727307,"_cnpm_publish_time":1419414727307,"dist-tags":{"latest":"1.1.0"}}