Skip to content

Commit

Permalink
doc(cli): better helper text for --ignore-leak-cluster-size-below
Browse files Browse the repository at this point in the history
Summary: The original helper text wasn't clear about what size threshold mean, this diff adds the unit (in bytes).

Differential Revision: D49934065

fbshipit-source-id: 30c6c26aa4fd73606f437000082402f497868dea
  • Loading branch information
JacksonGL authored and facebook-github-bot committed Oct 11, 2023
1 parent 38c72b5 commit e2865bf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ export default class LeakClusterSizeThresholdOption extends BaseOption {
}

getDescription(): string {
return 'ignore memory leaks with aggregated retained size smaller than the threshold';
return (
'ignore memory leaks with aggregated retained size ' +
'smaller than the threshold (in bytes)'
);
}

getExampleValues(): string[] {
Expand Down
6 changes: 3 additions & 3 deletions website/docs/cli/CLI-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ memlab run --scenario /tmp/test-scenario.js --work-dir /tmp/test-1/
* **`--worker`**: set title of the target (worker) that needs to be selected and analyzed
* **`--leak-filter`**: specify a definition JS file for leak filter
* **`--trace-object-size-above`**: objects with retained size (bytes) bigger than the threshold will be considered as leaks
* **`--ignore-leak-cluster-size-below`**: ignore memory leaks with aggregated retained size smaller than the threshold
* **`--ignore-leak-cluster-size-below`**: ignore memory leaks with aggregated retained size smaller than the threshold (in bytes)
* **`--trace-all-objects`**: dump retainer trace for all allocated objects (ignore the leak filter), available option modes: --trace-all-objects=selected-js-objects, --trace-all-objects=default
* **`--save-trace-as-unclassified-cluster`**: dump each retainer trace as an unclassified trace cluster
* **`--ml-clustering`**: use machine learning algorithms for clustering leak traces (by default, traces are clustered by heuristics)
Expand Down Expand Up @@ -95,7 +95,7 @@ memlab find-leaks --work-dir /memlab/working/dir/generated/by/memlab/
* **`--engine`**: set the JavaScript engine (default to V8)
* **`--leak-filter`**: specify a definition JS file for leak filter
* **`--trace-object-size-above`**: objects with retained size (bytes) bigger than the threshold will be considered as leaks
* **`--ignore-leak-cluster-size-below`**: ignore memory leaks with aggregated retained size smaller than the threshold
* **`--ignore-leak-cluster-size-below`**: ignore memory leaks with aggregated retained size smaller than the threshold (in bytes)
* **`--trace-all-objects`**: dump retainer trace for all allocated objects (ignore the leak filter), available option modes: --trace-all-objects=selected-js-objects, --trace-all-objects=default
* **`--save-trace-as-unclassified-cluster`**: dump each retainer trace as an unclassified trace cluster
* **`--ml-clustering`**: use machine learning algorithms for clustering leak traces (by default, traces are clustered by heuristics)
Expand Down Expand Up @@ -123,7 +123,7 @@ memlab diff-leaks
* **`--engine`**: set the JavaScript engine (default to V8)
* **`--leak-filter`**: specify a definition JS file for leak filter
* **`--trace-object-size-above`**: objects with retained size (bytes) bigger than the threshold will be considered as leaks
* **`--ignore-leak-cluster-size-below`**: ignore memory leaks with aggregated retained size smaller than the threshold
* **`--ignore-leak-cluster-size-below`**: ignore memory leaks with aggregated retained size smaller than the threshold (in bytes)
* **`--trace-all-objects`**: dump retainer trace for all allocated objects (ignore the leak filter), available option modes: --trace-all-objects=selected-js-objects, --trace-all-objects=default
* **`--save-trace-as-unclassified-cluster`**: dump each retainer trace as an unclassified trace cluster
* **`--ml-clustering`**: use machine learning algorithms for clustering leak traces (by default, traces are clustered by heuristics)
Expand Down

0 comments on commit e2865bf

Please sign in to comment.