記錄一款簡單好用的前端性能測試工具: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
