Skip to content

Commit

Permalink
chore(doc): update helper text content in doc and website
Browse files Browse the repository at this point in the history
Summary: This diff updates the memlab CLI helper text in the memlab website.

Differential Revision: D66550323

fbshipit-source-id: 64bd841098f733268e8d9aac740841883c057065
  • Loading branch information
JacksonGL authored and facebook-github-bot committed Dec 3, 2024
1 parent c2ba788 commit e8564bd
Showing 1 changed file with 38 additions and 35 deletions.
73 changes: 38 additions & 35 deletions website/docs/installation.md
Original file line number Diff line number Diff line change
@@ -10,14 +10,16 @@ npm install -g memlab
- [Npm](https://docs.npmjs.com/)

:::note
To build from the [Git repository](https://github.com/facebook/memlab) on Windows,
please use Git Bash.
To build from the [Git repository](https://github.com/facebook/memlab) on
Windows, please use Git Bash.
:::

## Commands

To check if the installation completed, run `memlab help` in your console,
you should see helper text as follows (view the documentation
for each command [here](./cli/CLI-commands.md)):
you should see helper text as follows (view the documentation for each
command [here](./cli/CLI-commands.md)):

```
$ memlab help
@@ -29,9 +31,10 @@ $ memlab help
Find memory leaks in web apps
Options: --work-dir --headful --full --skip-screenshot --skip-gc
--skip-scroll --skip-extra-ops --local-puppeteer
--scenario --device --user-agent --disable-xvfb
--disable-web-security --rewrite-js --log-script --worker
--leak-filter --trace-object-size-above
--scenario --chromium-binary --protocol-timeout --device
--user-agent --disable-xvfb --disable-web-security
--rewrite-js --log-script --worker --leak-filter
--trace-object-size-above
--ignore-leak-cluster-size-below --trace-all-objects
--save-trace-as-unclassified-cluster --ml-clustering
--ml-linkage-max-dist --ml-clustering-max-df
@@ -43,46 +46,45 @@ $ memlab help
memlab trace --node-id=<HEAP_OBJECT_ID>
Report retainer trace of a specific node, use with --nodeId
Options: --snapshot --snapshot-dir --engine --node-id
--heap-parser-dict-fast-store-size
memlab find-leaks
Find memory leaks in heap snapshots
There are three ways to specify inputs for the `memlab find-leaks` command:
1. `--baseline`, `--target`, `--final` specifies each snapshot input individually;
2. `--snapshot-dir` specifies the directory that holds all three heap snapshot files (MemLab will assign baseline, target, and final based on
alphabetic order of the file);
3. `--work-dir` specifies the output working directory of the `memlab run` or the `memlab snapshot` command;
Please only use one of the three ways to specify the input.
Options: --baseline --target --final --snapshot-dir --engine
--leak-filter --trace-object-size-above
--ignore-leak-cluster-size-below --trace-all-objects
--save-trace-as-unclassified-cluster --ml-clustering
--ml-linkage-max-dist --ml-clustering-max-df
--clean-up-snapshot --work-dir
--heap-parser-dict-fast-store-size
memlab analyze <PLUGIN_NAME> [PLUGIN_OPTIONS]
Run heap analysis plugins
Options: --work-dir
Run heap analysis on heap snapshots.
Options: --analysis-plugin --heap-parser-dict-fast-store-size
--work-dir
memlab help <COMMAND> [SUB-COMMANDS]
List all MemLab CLI commands or print helper text for a specific command
memlab diff-leaks
Find new memory leaks by diffing control and test heap snapshots
Options: --control-work-dir --treatment-work-dir --engine
Options: --control-snapshot --control-work-dir
--treatment-snapshot --treatment-work-dir --engine
--leak-filter --trace-object-size-above
--ignore-leak-cluster-size-below --trace-all-objects
--save-trace-as-unclassified-cluster --ml-clustering
--ml-linkage-max-dist --ml-clustering-max-df --work-dir
--ml-linkage-max-dist --ml-clustering-max-df
--max-cluster-sample-size --trace-contains
--heap-parser-dict-fast-store-size --work-dir
memlab heap --snapshot <HEAP_SNAPSHOT_FILE>
Interactive command to explore a single heap snapshot
Options: --snapshot --engine
Options: --snapshot --engine --heap-parser-dict-fast-store-size
memlab view-heap --snapshot <HEAP_SNAPSHOT_FILE>
Interactive command to view a single heap snapshot
Options: --snapshot --engine --node-id --ml-clustering --work-dir
--heap-parser-dict-fast-store-size
MISC COMMANDS
@@ -99,16 +101,17 @@ $ memlab help
Options: --headful --run-num --app --interaction --full
--skip-snapshot --skip-screenshot --skip-gc --skip-scroll
--skip-extra-ops --run-mode --local-puppeteer --scenario
--device --user-agent --disable-xvfb
--disable-web-security --rewrite-js --log-script
--work-dir
--chromium-binary --protocol-timeout --device
--user-agent --disable-xvfb --disable-web-security
--rewrite-js --log-script --work-dir
memlab warmup --scenario <TEST_SCENARIO_FILE>
Warm up the target app
Options: --headful --app --interaction --run-mode
--local-puppeteer --scenario --device --user-agent
--disable-xvfb --disable-web-security --skip-warmup
--rewrite-js --log-script --work-dir
--local-puppeteer --scenario --chromium-binary
--protocol-timeout --device --user-agent --disable-xvfb
--disable-web-security --skip-warmup --rewrite-js
--log-script --work-dir
memlab get-default-work-dir
Query the default working directory
@@ -118,16 +121,16 @@ $ memlab help
Options: --headful --app --interaction --full --skip-snapshot
--skip-screenshot --skip-gc --skip-scroll
--skip-extra-ops --run-mode --local-puppeteer --scenario
--device --user-agent --disable-xvfb
--disable-web-security --rewrite-js --log-script --worker
--work-dir
--chromium-binary --protocol-timeout --device
--user-agent --disable-xvfb --disable-web-security
--rewrite-js --log-script --worker --work-dir
memlab warmup-and-snapshot
memlab warmup-and-snapshot --scenario <TEST_SCENARIO_FILE>
Warm up server and take heap snapshots
Options: --work-dir --headful --app --interaction --run-mode
--local-puppeteer --scenario --device --user-agent
--disable-xvfb --disable-web-security --skip-warmup
--rewrite-js --log-script --full --skip-snapshot
--skip-screenshot --skip-gc --skip-scroll
--skip-extra-ops --worker
--local-puppeteer --scenario --chromium-binary
--protocol-timeout --device --user-agent --disable-xvfb
--disable-web-security --skip-warmup --rewrite-js
--log-script --full --skip-snapshot --skip-screenshot
--skip-gc --skip-scroll --skip-extra-ops --worker
```

0 comments on commit e8564bd

Please sign in to comment.