jlfwong / speedscope

🔬 A fast, interactive web-based viewer for performance profiles.
https://www.speedscope.app
MIT License
5.58k stars 247 forks source link

Fix import from Chrome Devtools performance tab in Chrome >= 114 #422

Closed jlfwong closed 1 year ago

jlfwong commented 1 year ago

The file format uses by Chrome Devtools performance tab periodically changes. It uses the Chrome trace event format (https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview).

This format, however, has two different types: one is TraceEvent[], the other is {traceEvents: traceEvent[]}. The importer for non-Chrome devtools profiles already handled this, but the one for Chrome Devtools didn't because Chrome < 114 never used it. It seems like they changed the file format. This PR addresses that change.

Fixes #420

coveralls commented 1 year ago

Coverage Status

coverage: 41.946% (+0.1%) from 41.844% when pulling baf5fb0b36f6596df9267b0f12e29e0f0d4470a9 on jlfwong/chrome-116-fix into 81a6f29ad1eb632683429084bd6c5f497667fb5e on main.