Skip to content

Commit 07b6fb3

Browse files
committed
Improve command line option documentation
1 parent 8d0b770 commit 07b6fb3

1 file changed

Lines changed: 52 additions & 15 deletions

File tree

docs/1.0/command.md

Lines changed: 52 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,58 @@ This is especially useful for:
2020
php vendor/bin/stackwatch --path=PATH [options]
2121
```
2222

23-
| Option | Description |
24-
|-----------------------|-------------------------------------------------------------------------|
25-
| `-p, --path=PATH` | Path to scan for PHP files to profile (required) |
26-
| `-o, --output=OUTPUT` | Path to store the profiling output (optional) |
27-
| `-f, --format=FORMAT` | Output format: `table` or `json` (default: `table`) |
28-
| `-d, --depth=DEPTH` | Recursion depth (`0` = current dir only, default: unlimited) (optional) |
29-
| `-n, --no-recursion` | Disable directory recursion (optional) |
30-
| `-x, --isolation` | Enable profiling each file in a separate process |
31-
| `--dry-run` | List profiling targets without executing them |
32-
| `-P, --pretty` | Pretty-print the JSON/NDJSON output (json only) |
33-
| `-i, --info` | Show additional system/environment information |
34-
| `-h, --help` | Display the help message |
35-
| `-V, --version` | Display the version and exit |
36-
| `-t, --tags` | filter the target to profile using tags (ie --tags=web) (optional) |
37-
| `--memory-limit` | change the memory usage of the main process (optional) |
23+
### Command Line Options
24+
25+
#### Configuration
26+
27+
**`-p, --path=PATH`**
28+
Path to scan for PHP files to profile. **Required.** The path can be a file or a directory.
29+
If it is a directory it will be recursively scan.
30+
31+
**`-i, --info`**
32+
Show additional system and environment information.
33+
34+
**`-h, --help`**
35+
Display the help message.
36+
37+
**`-V, --version`**
38+
Display the version and exit.
39+
40+
#### Output
41+
42+
**`-f, --format=FORMAT`**
43+
Output format. Can be either `'table'` or `'json'`. Default is `'table'`.
44+
45+
**`-o, --output=OUTPUT`**
46+
Path to store the profiling output.
47+
48+
**`--log=FILE`**
49+
Writes log information to the specified file. By default the log are written to the **`STDERR`** stream.
50+
51+
**`-P, --pretty`**
52+
Pretty-print the JSON/NDJSON output. **JSON only.**
53+
54+
#### Selection
55+
56+
**`-t, --tags=TAGS`**
57+
Only run the profiles for the listed tag(s).
58+
59+
**`-d, --depth=DEPTH`**
60+
Recursion depth. `0` means scan only the current directory. By default, recursion is unlimited.
61+
62+
**`-n, --no-recursion`**
63+
Disable directory recursion an alias to `--depth=0`
64+
65+
#### Execution
66+
67+
**`-x, --isolation`**
68+
Profile each file in isolation.
69+
70+
**`--dry-run`**
71+
List profiling targets without actually performing the profiling.
72+
73+
**`--memory-limit=MEMORY-LIMIT`**
74+
Memory limit to use for the analysis.
3875

3976
## Example
4077

0 commit comments

Comments
 (0)