Skip to content

Commit

Permalink
Merge pull request #46070 from Expensify/francois-revert-44432
Browse files Browse the repository at this point in the history
[CP Staging] Revert "Merge pull request #44432 from margelo/feat/release-profiler-on-web"
  • Loading branch information
srikarparsi authored Jul 23, 2024
2 parents 1c3c290 + d50f007 commit 29cc7c1
Show file tree
Hide file tree
Showing 26 changed files with 77 additions and 693 deletions.
12 changes: 0 additions & 12 deletions .github/workflows/platformDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,12 +179,6 @@ jobs:
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Archive desktop sourcemaps
uses: actions/upload-artifact@v3
with:
name: desktop-sourcemap-${{ github.ref_name }}
path: desktop/dist/www/merged-source-map.js.map

iOS:
name: Build and deploy iOS
needs: validateActor
Expand Down Expand Up @@ -354,12 +348,6 @@ jobs:
env:
S3_URL: s3://${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) && '' || 'staging-' }}expensify-cash

- name: Archive web sourcemaps
uses: actions/upload-artifact@v3
with:
name: web-sourcemap-${{ github.ref_name }}
path: dist/merged-source-map.js.map

- name: Purge Cloudflare cache
run: /home/runner/.local/bin/cli4 --verbose --delete hosts=["${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) && '' || 'staging.' }}new.expensify.com"] /zones/:9ee042e6cfc7fd45e74aa7d2f78d617b/purge_cache
env:
Expand Down
16 changes: 7 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,20 +230,19 @@ Within Xcode head to the build phase - `Bundle React Native code and images`.
```jsx
npm i && npm run pod-install
```
4. Depending on the platform you are targeting, run your Android/iOS app in production mode.
5. Upon completion, the generated source map can be found at:
7. Depending on the platform you are targeting, run your Android/iOS app in production mode.
8. Upon completion, the generated source map can be found at:
Android: `android/app/build/generated/sourcemaps/react/productionRelease/index.android.bundle.map`
IOS: `main.jsbundle.map`
web: `dist/merged-source-map.js.map`

### Recording a Trace:
1. Ensure you have generated the source map as outlined above.
2. Launch the app in production mode.
3. Navigate to the feature you wish to profile.
4. Initiate the profiling session by tapping with four fingers (on mobile) or `cmd+d` (on web) to open the menu and selecting **`Use Profiling`**.
5. Close the menu and interact with the app.
6. After completing your interactions, tap with four fingers or `cmd+d` again and select to stop profiling.
7. You will be presented with a **`Share`** option to export the trace, which includes a trace file (`Profile<app version>.cpuprofile`) and build info (`AppInfo<app version>.json`).
2. Navigate to the feature you wish to profile.
3. Initiate the profiling session by tapping with four fingers to open the menu and selecting **`Use Profiling`**.
4. Close the menu and interact with the app.
5. After completing your interactions, tap with four fingers again and select to stop profiling.
6. You will be presented with a **`Share`** option to export the trace, which includes a trace file (`Profile<app version>.cpuprofile`) and build info (`AppInfo<app version>.json`).

Build info:
```jsx
Expand All @@ -266,7 +265,6 @@ Build info:
4. Use the following commands to symbolicate the trace for Android and iOS, respectively:
Android: `npm run symbolicate-release:android`
IOS: `npm run symbolicate-release:ios`
web: `npm run symbolicate-release:web`
5. A new file named `Profile_trace_for_<app version>-converted.json` will appear in your project's root folder.
6. Open this file in your tool of choice:
- SpeedScope ([https://www.speedscope.app](https://www.speedscope.app/))
Expand Down
4 changes: 0 additions & 4 deletions config/webpack/webpack.dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@ const getConfiguration = (environment: Environment): Promise<Configuration> =>
cert: path.join(__dirname, 'certificate.pem'),
},
},
headers: {
// eslint-disable-next-line @typescript-eslint/naming-convention
'Document-Policy': 'js-profiling',
},
},
plugins: [
new DefinePlugin({
Expand Down
106 changes: 0 additions & 106 deletions desktop/electron-serve.ts

This file was deleted.

2 changes: 1 addition & 1 deletion desktop/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import type {BrowserView, MenuItem, MenuItemConstructorOptions, WebContents, Web
import contextMenu from 'electron-context-menu';
import log from 'electron-log';
import type {ElectronLog} from 'electron-log';
import serve from 'electron-serve';
import {autoUpdater} from 'electron-updater';
import {machineId} from 'node-machine-id';
import checkForUpdates from '@libs/checkForUpdates';
Expand All @@ -13,7 +14,6 @@ import type {TranslationPaths} from '@src/languages/types';
import type PlatformSpecificUpdater from '@src/setup/platformSetup/types';
import type {Locale} from '@src/types/onyx';
import type {CreateDownloadQueueModule, DownloadItem} from './createDownloadQueue';
import serve from './electron-serve';
import ELECTRON_EVENTS from './ELECTRON_EVENTS';

const createDownloadQueue = require<CreateDownloadQueueModule>('./createDownloadQueue').default;
Expand Down
17 changes: 17 additions & 0 deletions desktop/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"dependencies": {
"electron-context-menu": "^2.3.0",
"electron-log": "^4.4.8",
"electron-serve": "^1.3.0",
"electron-updater": "^6.2.1",
"node-machine-id": "^1.1.12"
},
Expand Down
Loading

0 comments on commit 29cc7c1

Please sign in to comment.