jlfwong / speedscope

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

Could not import the json example into www.speedscope.app #448

Closed mulle-nat closed 9 months ago

mulle-nat commented 9 months ago

I downloaded simple.speedscope.json and tried to import this into www.speedscope.app.

But this gives in Chromium (Firefox didn't work as well):


speedscope v1.16.0
speedscope.f27db165.js:30 WebGL initialized. renderer: ANGLE (NVIDIA Corporation, NVIDIA GeForce RTX 3060 Ti/PCIe/SSE2, OpenGL 4.5.0), vendor: Google Inc. (NVIDIA Corporation), version: WebGL 1.0 (OpenGL ES 2.0 Chromium)
speedscope.f27db165.js:183 Failed to load format TypeError: Cannot read properties of undefined (reading 'unit')
    at u (import.8ae8aa3d.js:111:1462)
    at import.8ae8aa3d.js:121:1875
    at Generator.next (<anonymous>)
    at s (import.8ae8aa3d.js:121:780)
DevTools failed to load source map: Could not load content for https://www.speedscope.app/speedscope.f27db165.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for https://www.speedscope.app/demangle-cpp.1768f4cc.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for https://www.speedscope.app/import.8ae8aa3d.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for https://www.speedscope.app/reset.8c46b7a1.css.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for https://www.speedscope.app/source-map.438fa06b.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
```
jlfwong commented 9 months ago

Hi @mulle-nat! Thanks for the report -- I can reproduce, which is strange because there's a test that covers this file! https://github.com/jlfwong/speedscope/blob/de17f128d0ce9d2a696ac7772dec6393dc2888b4/src/lib/file-format.test.ts#L5

Will investigate next time I sit down to work on this code