文件名称:speedometer:javascript中的速度测量
文件大小:2KB
文件格式:ZIP
更新时间:2024-06-01 02:46:23
JavaScript
车速表 用Javascript进行速度测量 npm install speedometer 用法 var speedometer = require ( 'speedometer' ) var fs = require ( 'fs' ) // Let's measure how fast we can read from /dev/urandom var speed = speedometer ( ) var stream = fs . createReadStream ( '/dev/urandom' ) stream . on ( 'data' , function ( data ) { // Simply call speed with the amount of bytes transferred var bytesPerSecond = speed ( data . le
【文件预览】:
speedometer-master
----LICENSE(1KB)
----README.md(743B)
----index.js(906B)
----package.json(333B)