Hiper的安装
npminstallhiper-g
#或者使用yarn:
#yarnglobaladdhiper
输出
注意:Ittakesperiod(m)stoload....这个period是运行本次测试所用时间.因此,-n越大,这个数越大
Hiper性能指标
Key Value
DNS查询耗时 domainLookupEnd-domainLookupStart
TCP连接耗时 connectEnd-connectStart
第一个Byte到达浏览器的用时 responseStart-requestStart
页面下载耗时 responseEnd-responseStart
DOMReady之后又继续下载资源的耗时 domComplete-domInteractive
白屏时间 domInteractive-navigationStart
DOMReady耗时 domContentLoadedEventEnd-navigationStart
页面加载总耗时 loadEventEnd-navigationStart
使用
hiper--help
Usage:hiper[options][url]
令人愉悦的性能统计分析工具
Options:
-v,--version输出版本号
-n,--count
-c,--config
-u,--useragent
-H,--headless[b]是否使用无头模式(默认为true)
-e,--executablePath
--no-cache禁用缓存(默认为false)
--no-JavaScript禁用JavaScript(默认为false)
--no-online禁用网络(默认为false)
-h,--help输出帮助信息