前端性能测试之lighthouse

记录一款简单好用的前端性能测试工具:https://github.com/GoogleChrome/lighthouse

这是一款基于chorme的测试工具,使用很简单:

1 使用npm全局安装

2 安装好后在cmd里运行:

lighthouse http://localhost:3000 --view --emulated-form-factor desktop -throttling-method=provided

如果URL有参数需要用" "将url包裹,如:lighthouse "http://localhost:9090/rendition/eppublic/uiservices/open_document?doc_id=4452574&show_html_only=true&internal_use_only=true&productCode=MultiCompany" --view --emulated-form-factor desktop -throttling-method=provided

关于-throttling-method=provided可以看:https://developers.google.com/web/tools/lighthouse/v3/migration

posted @ 2019-05-24 11:28  jim520  阅读(1757)  评论(0编辑  收藏  举报