记录一款简单好用的前端性能测试工具:https://github.com/GoogleChrome/lighthousehtml
这是一款基于chorme的测试工具,使用很简单:前端
1 使用npm全局安装git
2 安装好后在cmd里运行:github
lighthouse http://localhost:3000 --view --emulated-form-factor desktop -throttling-method=providedweb
若是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=providednpm
关于-throttling-method=provided能够看:https://developers.google.com/web/tools/lighthouse/v3/migration前端性能