{"name":"speedometer","version":"0.1.1","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"},"_id":"speedometer@0.1.1","dist":{"shasum":"e5343ecb825182a5ddb211b2527b911e3b963122","tarball":"http://registry-npm.ywwl.com/speedometer/download/speedometer-0.1.1.tgz","integrity":"sha512-ghVxt/DQLt4OFTp4Om4m54rmuDdIkUc6hOMz+EY8lEp8B5LURI37FWxFzvlv8HZyYLD5DaRgeJwRNJYrF9IOjg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAzA0iN76qqeCk0hNBtAUXcUQQwvDUByLHTFgeizhTCkAiBocVCyN799ZVxb9hVLRDPHLf2M/FpMwHrzLoBG3n36dA=="}],"size":909,"noattachment":false,"key":"/speedometer/-/speedometer-0.1.1.tgz"},"_from":".","_npmVersion":"1.2.18","_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":1366147564045,"_cnpm_publish_time":1366147564045,"dist-tags":{"latest":"1.1.0"}}