1

使用 puppeteer 我录制了网站的表演文件

[{"pid":397,"tid":775,"ts":138122917281,"ph":"X","cat":"disabled-by-default-devtools.timeline","name":"RunTask","dur":291,"tdur":281,"tts":3411890200,"args":{}},
{"pid":397,"tid":775,"ts":138122917650,"ph":"X","cat":"disabled-by-default-devtools.timeline","name":"RunTask","dur":7,"tdur":7,"tts":3411890558,"args":{}},
{"pid":397,"tid":775,"ts":138122917695,"ph":"X","cat":"disabled-by-default-devtools.timeline","name":"RunTask","dur":7,"tdur":7,"tts":3411890603,"args":{}},
{"pid":397,"tid":775,"ts":138122917707,"ph":"X","cat":"disabled-by-default-...

如何自动解析此文件以获得结果,例如在性能选项卡中的“加载、脚本、渲染等”。

191 ms Loading
6083 ms Scripting
883 ms Rendering
214 ms Painting
1227 ms System
2466 ms Idle
4

1 回答 1

0

万一其他人像我一样来到这里,我找到了几个用于性能文件解析的库。希望其中之一可以帮助其他人!

于 2020-01-30T17:44:47.073 回答