Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import React Concurrent Mode Profiler #19634

Merged
merged 131 commits into from
Aug 20, 2020
Merged
Show file tree
Hide file tree
Changes from 124 commits
Commits
Show all changes
131 commits
Select commit Hold shift + click to select a range
ef80d82
Checkin prototype with small example profile JSON
Jan 6, 2020
aeb7ac0
Auto-align flamegraph labels with edge of screen if scrolled partiall…
Jan 7, 2020
eed2ca6
Config changes
Jan 7, 2020
252e486
Added context menu
Jan 7, 2020
1a66278
STASHING
Jan 8, 2020
9887a57
Work in progress lanes
Jun 5, 2020
6fffde4
Merge pull request #4 from MLH-Fellowship/lanes
kartikcho Jun 15, 2020
831357b
Upgrade dependencies
taneliang Jun 15, 2020
240f9d3
Disable caching to fix tooltip bugs
kartikcho Jun 15, 2020
56e9bb1
Merge pull request #5 from MLH-Fellowship/parcel-patch
kartikcho Jun 16, 2020
8260bdc
Enable Flow in VS Code by adding flow-bin, .flowconfig and VS code se…
taneliang Jun 16, 2020
d0f9295
Merge pull request #6 from MLH-Fellowship/eliang/flow
kartikcho Jun 16, 2020
63af326
Add type annotations (1/n) (#7)
taneliang Jun 16, 2020
6379a2e
Add type annotations (2/n) (#8)
taneliang Jun 17, 2020
178910b
Add Jest and configs
taneliang Jun 22, 2020
80dea04
Fix yarn start Babel error
taneliang Jun 22, 2020
e027a56
Add demo test script
taneliang Jun 22, 2020
87f7a7d
Revert "Add demo test script"
taneliang Jun 22, 2020
6c7a9b3
Add yarn test script
taneliang Jun 22, 2020
ed38bc6
Merge pull request #15 from MLH-Fellowship/eliang/jest
kartikcho Jun 22, 2020
7de190e
Codebase Restructure (#12)
kartikcho Jun 23, 2020
dab97b0
Add types for canvas files
taneliang Jun 23, 2020
8f84396
Merge pull request #17 from MLH-Fellowship/eliang/type-canvas
kartikcho Jun 23, 2020
363c258
Use React project Prettier configs (#21)
taneliang Jun 26, 2020
bb64e8c
Add ESLint (#22)
taneliang Jun 26, 2020
f4edd14
Implement new preprocessData and types to support new React marks (#20)
taneliang Jun 29, 2020
b691699
Add GitHub Actions workflow (#24)
taneliang Jun 29, 2020
3d8c83e
Break App.js into CanvasPage and ImportPage (#25)
taneliang Jun 29, 2020
ea2ebfa
Fix preprocessDataV2 to prevent enormous React timestamps
taneliang Jun 30, 2020
daef39c
Merge pull request #28 from MLH-Fellowship/eliang/fix-enormous-timestamp
kartikcho Jun 30, 2020
dfdece8
Update proptypes to v2
kartikcho Jun 30, 2020
97b1543
Break renderCanvas into small render* functions (#27)
taneliang Jun 30, 2020
a99e767
Separate v1 v2 data
kartikcho Jul 1, 2020
cba77ba
Remove setSchedulerCanvasHeight
kartikcho Jul 2, 2020
a5b3a41
Merge pull request #36 from MLH-Fellowship/migration-to-v2-data
kartikcho Jul 2, 2020
02748cc
[Canvas V2][1/n] Implement display of measures (#31)
taneliang Jul 3, 2020
0408565
[Canvas V2][2/n] Implement lane dividers and background (#32)
taneliang Jul 3, 2020
92702a9
[Canvas V2][3/n] Implement React event row (#33)
taneliang Jul 3, 2020
c3eb419
[Canvas V2][4/n] Migrate hover and context menus (#34)
taneliang Jul 3, 2020
a73c9c4
Remove V1 types and usage
taneliang Jul 3, 2020
04e81c3
Rename all *V2
taneliang Jul 3, 2020
6fcac70
Merge pull request #46 from MLH-Fellowship/rm-v1
kartikcho Jul 3, 2020
cc0dec3
[Canvas V2][5/n] Improve getHoveredEvent clarity (#40)
taneliang Jul 3, 2020
b72cdda
Fix React data and flamegraph alignment (#53)
taneliang Jul 8, 2020
a74031b
Add minor EventTooltip improvements
taneliang Jul 8, 2020
ce2f361
Upgrade Parcel and Flow and fix Flow config (#58)
taneliang Jul 8, 2020
bcea552
Merge pull request #59 from MLH-Fellowship/eliang/improve-tooltips
kartikcho Jul 8, 2020
3a5e663
Decrease lane height by 1/3, add note to react_gutter_size
kartikcho Jul 8, 2020
0a67c96
Revert lane border size, rename REACT_PRIORITY_BORDER_SIZE to REACT_W…
kartikcho Jul 8, 2020
8ce533f
Run Prettier
taneliang Jul 9, 2020
b640743
Fix nit: add space before comment text
taneliang Jul 9, 2020
7958562
Decrease lane height (#60)
taneliang Jul 9, 2020
bdf7e65
Add Prettier errors to ESLint (#61)
taneliang Jul 9, 2020
1d5991e
Add Import page and Import button (#64)
kartikcho Jul 13, 2020
81ed6d5
Update preprocessData, add latest performance profile (#63)
kartikcho Jul 13, 2020
3f78fdc
Add basic README (#66)
taneliang Jul 15, 2020
02acac0
Fix Flow large memory usage (#79)
taneliang Jul 21, 2020
8d98ae0
Remove link to a private internal repo (#81)
kartikcho Jul 27, 2020
474a424
Fix tooltip bug, truncate componentName to use ellipsis (#78)
kartikcho Jul 27, 2020
19b1fcf
Reimplement canvas using view classes (#80)
taneliang Jul 28, 2020
963f62f
Add key mappings and legend to import page (#88)
kartikcho Jul 28, 2020
8d22414
Fix lint failure from #88
taneliang Jul 28, 2020
10a78e2
Tweak CI config to run on all branches and on check_suite (#94)
taneliang Jul 28, 2020
415dc16
[Optimize flamechart][1/4] Add flamechart to ReactProfilerData
taneliang Jul 28, 2020
26b62b9
Fix tests (#97)
taneliang Jul 29, 2020
1f46ef2
[Optimize flamechart][2/4] Replace Speedscope types with custom stack…
taneliang Jul 28, 2020
036e4c0
[Optimize flamechart][3/4] Rename flame graph -> flame chart
taneliang Jul 28, 2020
2797f85
Fix strict mode error (#98)
kartikcho Jul 29, 2020
fe433c8
[Optimize flamechart][4/4] Split FlamechartView into row views
taneliang Jul 28, 2020
2c79e71
Add Chromium flamechart colors (#96)
taneliang Jul 30, 2020
e0c29fb
Text animation fix (#106)
vikashchander Jul 31, 2020
4385a12
[Improve base View][1/n] Add subview handling to View (#99)
taneliang Aug 3, 2020
32a33b0
[Improve base View][2/n] Rationalize view layout system (#100)
taneliang Aug 3, 2020
ec3383b
[Improve base View][3/n] Add _ to views' private vars and methods (#101)
taneliang Aug 3, 2020
492ef03
[Improve base View][4/n] Write tests for geometry.js (#102)
taneliang Aug 3, 2020
7263953
Refactor tooltip label switch into a util (#103)
kartikcho Aug 3, 2020
636c7ae
[Resize content][1/n] Break horizontal scrolling area into final-ish …
taneliang Aug 4, 2020
6c4ad87
[Resize content][2/n] Implement ResizableSplitView (#107)
taneliang Aug 4, 2020
1f0be0a
[Resize content][3/n] Sync horizontal pan and zoom states (#108)
taneliang Aug 4, 2020
2f74a5c
Implement User Timing marks view (#109)
taneliang Aug 4, 2020
cb50ff8
Highlight React events with the same wakeable ID (#111)
taneliang Aug 4, 2020
371ddf5
Improve Firefox scrolling performance (#114)
taneliang Aug 5, 2020
a115c58
Codemod pan/hover interactions -> mouse interactions (#115)
taneliang Aug 5, 2020
2084197
Listen to mouse move events when dragging offscreen (#116)
taneliang Aug 5, 2020
020916f
Upgrade dependencies, including Speedscope fork with upstreamed fix (…
taneliang Aug 5, 2020
743da0c
Normalize wheel behavior across browsers (#117)
taneliang Aug 6, 2020
92f4750
Reorganize layout and canvas folders (#120)
taneliang Aug 6, 2020
09fbff4
Reimplement zoom to batch (#123)
taneliang Aug 10, 2020
d1b1b50
Fix tooltip (#121)
taneliang Aug 10, 2020
a530c70
Switch to concurrent React (#122)
taneliang Aug 10, 2020
82ff1b3
Update color palette for accessibility (#126)
kartikcho Aug 14, 2020
6c83208
[Import Prep][1/n] Upgrade dependencies (#128)
taneliang Aug 17, 2020
42ed300
[Import Prep][2/n] Remove graveyard (#129)
taneliang Aug 17, 2020
16b1fc2
[Import Prep][3/n] Remove unnecessary sample profiles (#130)
taneliang Aug 17, 2020
89d5512
[Import Prep][4/n] Fix Flow errors (#133)
taneliang Aug 17, 2020
a42be68
[Import Prep][5/n] Deduplicate clamp, cleanup TODOs (#131)
taneliang Aug 17, 2020
65415ec
[Import Prep][6/n] Update package.json (#132)
taneliang Aug 17, 2020
c73eca9
[Import Prep][7/n] Fix indeterministic test mark ordering (#127)
taneliang Aug 17, 2020
1f5e9e3
Initializing empty merge repo
taneliang Aug 17, 2020
0e9482a
Merge remote-tracking branch 'profiler/master'
taneliang Aug 17, 2020
ebe8133
Move everything into packages/react-scheduling-profiler
taneliang Aug 17, 2020
9d61274
Merge remote-tracking branch 'profiler-importable/importable' into sc…
taneliang Aug 17, 2020
e132f9e
Integrate package.json, Flow, lint, Prettier, Yarn
taneliang Aug 17, 2020
8522a69
Fix build
taneliang Aug 17, 2020
b078c0d
Remove unused service worker
taneliang Aug 17, 2020
0602ebf
Upgrade Speedscope: switch module type to commonjs
taneliang Aug 17, 2020
b5f895c
Fix flow
taneliang Aug 17, 2020
d8f73f0
Fix most lint
taneliang Aug 17, 2020
cf3730d
Rename package react-scheduling-profiler -> react-devtools-scheduling…
taneliang Aug 17, 2020
2fc46ad
Fix tests and add Flow coverage to 2 test files
taneliang Aug 17, 2020
0f56751
Add FB copyright header
taneliang Aug 17, 2020
9aa2195
Remove custom test setup
taneliang Aug 17, 2020
3adb1cc
Rename page title
taneliang Aug 17, 2020
223429d
Remove project .gitignore
taneliang Aug 17, 2020
7e8725a
Replace Parcel with Webpack
taneliang Aug 18, 2020
a633ac3
Fix build by upgrading all @babel/* across repo
taneliang Aug 18, 2020
9b2d982
Enable preprocessData errors in prod, fix tests
taneliang Aug 18, 2020
42a59e6
Remove demo profile DEV-only autoload
taneliang Aug 19, 2020
00a5b67
Merge remote-tracking branch 'upstream/master' into scheduling-profil…
taneliang Aug 19, 2020
c96c193
Move syncedHPAZVs into React ref and clean up CanvasPage imports
taneliang Aug 19, 2020
826ca92
Resolve misc review comments
taneliang Aug 19, 2020
fbf4fd8
Adopt null coalescing operator to fix bug where 0 line/col becomes em…
taneliang Aug 19, 2020
255a0dd
rename button classes
kartikcho Aug 20, 2020
7c483a8
Remove interactor callback hook deps
taneliang Aug 20, 2020
689b383
Hide open context menu before next one is shown
taneliang Aug 20, 2020
a0a6eb9
geometry.js: rectIntersectionWithRect -> intersectionOfRects, boundar…
taneliang Aug 20, 2020
6c8756a
Inline --gradient-height CSS var
taneliang Aug 20, 2020
8d276d4
Merge remote-tracking branch 'upstream/master' into scheduling-profil…
taneliang Aug 20, 2020
ca48ce3
geometry.js: make base types stricter
taneliang Aug 20, 2020
4da3cf4
Add empty dep array to interactor useCallback
taneliang Aug 20, 2020
5847027
Merge remote-tracking branch 'upstream/master' into scheduling-profil…
taneliang Aug 20, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ packages/react-devtools-extensions/chrome/build
packages/react-devtools-extensions/firefox/build
packages/react-devtools-extensions/shared/build
packages/react-devtools-inline/dist
packages/react-devtools-shell/dist
packages/react-devtools-shell/dist
packages/react-devtools-scheduling-profiler/dist
packages/react-devtools-scheduling-profiler/static
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,5 @@ packages/react-devtools-extensions/firefox/*.pem
packages/react-devtools-extensions/shared/build
packages/react-devtools-extensions/.tempUserDataDir
packages/react-devtools-inline/dist
packages/react-devtools-shell/dist
packages/react-devtools-shell/dist
packages/react-devtools-scheduling-profiler/dist
4 changes: 3 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ packages/react-devtools-extensions/chrome/build
packages/react-devtools-extensions/firefox/build
packages/react-devtools-extensions/shared/build
packages/react-devtools-inline/dist
packages/react-devtools-shell/dist
packages/react-devtools-shell/dist
packages/react-devtools-scheduling-profiler/dist
packages/react-devtools-scheduling-profiler/static
58 changes: 29 additions & 29 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,35 @@
"packages/*"
],
"devDependencies": {
"@babel/cli": "^7.8.0",
"@babel/code-frame": "^7.8.0",
"@babel/core": "^7.8.0",
"@babel/helper-module-imports": "^7.8.0",
"@babel/parser": "^7.8.0",
"@babel/plugin-external-helpers": "^7.8.0",
"@babel/plugin-proposal-class-properties": "^7.8.0",
"@babel/plugin-proposal-object-rest-spread": "^7.8.0",
"@babel/plugin-syntax-dynamic-import": "^7.8.0",
"@babel/plugin-syntax-jsx": "^7.8.0",
"@babel/plugin-transform-arrow-functions": "^7.8.0",
"@babel/plugin-transform-async-to-generator": "^7.8.0",
"@babel/plugin-transform-block-scoped-functions": "^7.8.0",
"@babel/plugin-transform-block-scoping": "^7.8.0",
"@babel/plugin-transform-classes": "^7.8.0",
"@babel/plugin-transform-computed-properties": "^7.8.0",
"@babel/plugin-transform-destructuring": "^7.8.0",
"@babel/plugin-transform-for-of": "^7.8.0",
"@babel/plugin-transform-literals": "^7.8.0",
"@babel/plugin-transform-modules-commonjs": "^7.8.0",
"@babel/plugin-transform-object-super": "^7.8.0",
"@babel/plugin-transform-parameters": "^7.8.0",
"@babel/plugin-transform-react-jsx-source": "^7.8.0",
"@babel/plugin-transform-shorthand-properties": "^7.8.0",
"@babel/plugin-transform-spread": "^7.8.0",
"@babel/plugin-transform-template-literals": "^7.8.0",
"@babel/preset-flow": "^7.8.0",
"@babel/preset-react": "^7.8.0",
"@babel/traverse": "^7.8.0",
"@babel/cli": "^7.10.5",
"@babel/code-frame": "^7.10.4",
"@babel/core": "^7.11.1",
"@babel/helper-module-imports": "^7.10.4",
"@babel/parser": "^7.11.3",
"@babel/plugin-external-helpers": "^7.10.4",
"@babel/plugin-proposal-class-properties": "^7.10.4",
"@babel/plugin-proposal-object-rest-spread": "^7.11.0",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-syntax-jsx": "^7.10.4",
"@babel/plugin-transform-arrow-functions": "^7.10.4",
"@babel/plugin-transform-async-to-generator": "^7.10.4",
"@babel/plugin-transform-block-scoped-functions": "^7.10.4",
"@babel/plugin-transform-block-scoping": "^7.11.1",
"@babel/plugin-transform-classes": "^7.10.4",
"@babel/plugin-transform-computed-properties": "^7.10.4",
"@babel/plugin-transform-destructuring": "^7.10.4",
"@babel/plugin-transform-for-of": "^7.10.4",
"@babel/plugin-transform-literals": "^7.10.4",
"@babel/plugin-transform-modules-commonjs": "^7.10.4",
"@babel/plugin-transform-object-super": "^7.10.4",
"@babel/plugin-transform-parameters": "^7.10.5",
"@babel/plugin-transform-react-jsx-source": "^7.10.5",
"@babel/plugin-transform-shorthand-properties": "^7.10.4",
"@babel/plugin-transform-spread": "^7.11.0",
"@babel/plugin-transform-template-literals": "^7.10.5",
"@babel/preset-flow": "^7.10.4",
"@babel/preset-react": "^7.10.4",
"@babel/traverse": "^7.11.0",
"@mattiasbuelens/web-streams-polyfill": "^0.3.2",
"art": "0.10.1",
"babel-eslint": "^10.0.3",
Expand Down
14 changes: 7 additions & 7 deletions packages/react-devtools-extensions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
"test:edge": "node ./edge/test"
},
"devDependencies": {
"@babel/core": "^7.1.6",
"@babel/plugin-proposal-class-properties": "^7.1.0",
"@babel/plugin-transform-flow-strip-types": "^7.1.6",
"@babel/plugin-transform-react-jsx-source": "^7.2.0",
"@babel/preset-env": "^7.1.6",
"@babel/preset-flow": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"@babel/core": "^7.11.1",
"@babel/plugin-proposal-class-properties": "^7.10.4",
"@babel/plugin-transform-flow-strip-types": "^7.10.4",
"@babel/plugin-transform-react-jsx-source": "^7.10.5",
"@babel/preset-env": "^7.11.0",
"@babel/preset-flow": "^7.10.4",
"@babel/preset-react": "^7.10.4",
"archiver": "^3.0.0",
"babel-core": "^7.0.0-bridge",
"babel-eslint": "^9.0.0",
Expand Down
14 changes: 7 additions & 7 deletions packages/react-devtools-inline/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
},
"dependencies": {},
"devDependencies": {
"@babel/core": "^7.1.6",
"@babel/plugin-proposal-class-properties": "^7.1.0",
"@babel/plugin-transform-flow-strip-types": "^7.1.6",
"@babel/plugin-transform-react-jsx-source": "^7.2.0",
"@babel/preset-env": "^7.1.6",
"@babel/preset-flow": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"@babel/core": "^7.11.1",
"@babel/plugin-proposal-class-properties": "^7.10.4",
"@babel/plugin-transform-flow-strip-types": "^7.10.4",
"@babel/plugin-transform-react-jsx-source": "^7.10.5",
"@babel/preset-env": "^7.11.0",
"@babel/preset-flow": "^7.10.4",
"@babel/preset-react": "^7.10.4",
"babel-core": "^7.0.0-bridge",
"babel-eslint": "^9.0.0",
"babel-loader": "^8.0.4",
Expand Down
3 changes: 3 additions & 0 deletions packages/react-devtools-scheduling-profiler/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Experimental React Concurrent Mode Profiler

- Deployed at: https://react-scheduling-profiler.vercel.app
30 changes: 30 additions & 0 deletions packages/react-devtools-scheduling-profiler/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"private": true,
"name": "react-devtools-scheduling-profiler",
"version": "0.0.1",
"license": "MIT",
"scripts": {
"build": "cross-env NODE_ENV=production cross-env TARGET=remote webpack --config webpack.config.js",
"start": "cross-env NODE_ENV=development cross-env TARGET=local webpack-dev-server --open"
},
"dependencies": {
"@elg/speedscope": "1.9.0-a6f84db",
"clipboard-js": "^0.3.6",
"memoize-one": "^5.1.1",
"nullthrows": "^1.1.1",
"pretty-ms": "^7.0.0",
"react-virtualized-auto-sizer": "^1.0.2",
"regenerator-runtime": "^0.13.7"
},
"devDependencies": {
"babel-loader": "^8.1.0",
"css-loader": "^4.2.1",
"file-loader": "^6.0.0",
"html-webpack-plugin": "^4.3.0",
"style-loader": "^1.2.1",
"url-loader": "^4.1.0",
"webpack": "^4.44.1",
"webpack-cli": "^3.3.12",
"webpack-dev-server": "^3.11.0"
}
}
28 changes: 28 additions & 0 deletions packages/react-devtools-scheduling-profiler/src/App.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/

import type {ReactProfilerData} from './types';

import * as React from 'react';
import {useState} from 'react';

import ImportPage from './ImportPage';
import CanvasPage from './CanvasPage';

export default function App() {
const [profilerData, setProfilerData] = useState<ReactProfilerData | null>(
null,
);

if (profilerData) {
return <CanvasPage profilerData={profilerData} />;
} else {
return <ImportPage onDataImported={setProfilerData} />;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.CanvasPage {
position: absolute;
top: 0.5rem;
bottom: 0.5rem;
left: 0.5rem;
right: 0.5rem;
}
Loading