jlfwong / speedscope

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

Add support for cycle-based Instruments deep copy #400

Closed evanw closed 2 years ago

evanw commented 2 years ago

Unlike the Time Profiler, the CPU Profiler in Instruments use cycles for units instead of ms:

Currently Speedscope fails to import the data with the following error in the console:

Failed to load format Error: Unrecognized units Gc

This PR adds support for cycles as a unit to the Instruments deep copy importer as well as Kc, Mc, and Gc, which I'm assuming are increasing in multiples of 1000. Hopefully I've added support for this correctly and this PR is helpful.

coveralls commented 2 years ago

Coverage Status

Coverage increased (+0.05%) to 41.652% when pulling 834be6049d91a389956c585d00efdc510b943eb1 on evanw:instruments-cycles into 33a8f3f313a565b66e0bfa1b163962c418657c13 on jlfwong:main.

jlfwong commented 2 years ago

Thanks!