speedscope/src
Jamie Wong d30bb2ef7e
Fix the build for node 13.x, make travis test 10, 12, 13, stable (#263)
@JustinBeckwith pointed out in #262 that `npm install` was broken in node 13.x, and @DanielRuf pointed in #254 that test fail for node 11+ because of a change to stability of sorting.

This PR seeks to address both of those.

The installation issue was fixed by just regenerating `package-lock.json` without needing to bump any of the direct dependency versions. The test failure issue requires manual intervention.

To fix the sort stability issue, I updated the tests to use the stable sort values (these were all the correct values, though some of the test values were incorrect).

To make the suite still pass for node 10, I added a hack where I override `Array.prototype.sort` with a stable implementation that's *only* used in tests (See comments in code for a justification for why)

## Test Plan

Before this PR: `npm install` on node 13.x fails & `npm run jest` results in test failures
After this PR: `npm install` on node 13.x passes & `npm run jest` passes for node 10, 12, and 13.
2020-04-20 08:26:59 -07:00
..
gl Fix the build for node 13.x, make travis test 10, 12, 13, stable (#263) 2020-04-20 08:26:59 -07:00
import Fix the build for node 13.x, make travis test 10, 12, 13, stable (#263) 2020-04-20 08:26:59 -07:00
lib Fix the build for node 13.x, make travis test 10, 12, 13, stable (#263) 2020-04-20 08:26:59 -07:00
store Fix the build for node 13.x, make travis test 10, 12, 13, stable (#263) 2020-04-20 08:26:59 -07:00
typings Replace regl with GPU apis ported from evanw/sky (#140) 2018-08-19 11:37:47 -07:00
views Fix the build for node 13.x, make travis test 10, 12, 13, stable (#263) 2020-04-20 08:26:59 -07:00
jest-setup.js Fix the build for node 13.x, make travis test 10, 12, 13, stable (#263) 2020-04-20 08:26:59 -07:00
README.md Add contributor guidelines & documentation (#144) 2018-08-20 09:42:44 -07:00
speedscope.tsx Add support for profiles w/ multiples processes & threads (#130) 2018-08-11 22:06:53 -07:00

Speedscope TypeScript source

This directory contains the bulk of speedscope's source code.

Subdirectories

  • gl/: WebGL code. This includes e.g. the code to render flamecharts.
  • import/: Code to import profiles from varous profilers into speedscope. This include e.g. the code to import Chrome performance profiles.
  • lib/: Mostly dependency-less utilities. This includes e.g. an LRU cache implementation, basic linear algebra classes, and the definition of speedscope's file format.
  • store/: Speedscope's application state management. Implemented using redux.
  • typings/: TypeScript definition files
  • views/: View code to generate the HTML & CSS used to construct the UI. Implemented using preact and aphrodite. Also contains code mapping from the redux store to views using preact-redux