You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/commands/run.md
+20-20
Original file line number
Diff line number
Diff line change
@@ -2,21 +2,21 @@
2
2
3
3
```shell
4
4
➜ pybm run -h
5
-
usage: pybm run <benchmark><environment(s)> [<options>]
5
+
usage: pybm run <benchmark><workspace(s)> [<options>]
6
6
7
-
Run pybm benchmark workloads in specified environments.
7
+
Run pybm benchmark workloads in specified workspaces.
8
8
9
9
positional arguments:
10
10
<benchmark> Name of the benchmark target(s) to run. Can be a path to a single file, a directory, or a glob expression. Given paths need to be relative to the worktree root.
11
-
<environment(s)> Environments to run the benchmarks in. If omitted, by default, benchmarks will be run in the main environmentif only one environment exists, otherwise an error will be raised,
11
+
<workspace(s)> Environments to run the benchmarks in. If omitted, by default, benchmarks will be run in the main workspaceif only one workspace exists, otherwise an error will be raised,
12
12
unless the "--all" switch is used.
13
13
14
14
optional arguments:
15
15
-h, --help Show this message and exit.
16
16
-v Enable verbose mode. Makes pybm log information that might be useful for debugging.
17
17
-m Run benchmark targets as modules. Use this to benchmark code outside of a package.
18
-
--checkout Run benchmarks in checkout mode inenvironment"root". Here, instead of persisted git worktrees, different refs are benchmarked using `git checkout` commands.
19
-
--all Run specified benchmarks in all existing pybm environments.
18
+
--checkout Run benchmarks in checkout mode inworkspace"root". Here, instead of persisted git worktrees, different refs are benchmarked using `git checkout` commands.
19
+
--all Run specified benchmarks in all existing pybm workspaces.
20
20
-S <git-ref>, --source <git-ref>
21
21
Source benchmark targets from a different git reference.
22
22
--repetitions <reps> Number of repetitions for the target benchmarks.
@@ -25,39 +25,39 @@ optional arguments:
25
25
```
26
26
27
27
The `pybm run`command is perhaps the heart of `pybm`'s functionality. It is responsible for discovering, dispatching
28
-
and running the appropriate benchmarks across the chosen environments. There are multiple nuances to running benchmarks
28
+
and running the appropriate benchmarks across the chosen workspaces. There are multiple nuances to running benchmarks
29
29
in pybm, all of which will be covered now.
30
30
31
31
## Understanding the basics
32
32
33
33
If you have your benchmarks under a `benchmarks` folder in your project, run all benchmarks like this, supposing you
34
-
want to run them sequentially in environments named `my-env1` to `my-envN`:
34
+
want to run them sequentially in workspaces named `my-workspace1` to `my-workspaceN`:
35
35
36
36
```shell
37
-
pybm run benchmarks my-env1 my-env2 ... my-envN
37
+
pybm run benchmarks my-workspace1 my-workspace2 ... my-workspaceN
38
38
```
39
39
40
-
This will run the benchmarks in all the environments from my-env1 to my-envN.
40
+
This will run the benchmarks in all the workspaces from my-workspace1 to my-workspaceN.
41
41
42
42
Running a single file (let it be `foo.py`) inside a folder also works:
43
43
44
44
```shell
45
-
pybm run benchmarks/foo.py my-env1 my-env2 ... my-envN
45
+
pybm run benchmarks/foo.py my-workspace1 my-workspace2 ... my-workspaceN
46
46
```
47
47
48
48
Lastly, you can also supply a glob expression:
49
49
50
50
```shell
51
51
# runs all benchmark files starting with foo.
52
-
pybm run benchmarks/foo*.py my-env1 my-env2 ... my-envN
52
+
pybm run benchmarks/foo*.py my-workspace1 my-workspace2 ... my-workspaceN
53
53
```
54
54
55
-
## Running benchmarks in all available environments
55
+
## Running benchmarks in all available workspaces
56
56
57
-
To run a benchmark in *all* available environments (list them with `pybm env list`), use the `--all` switch:
57
+
To run a benchmark in *all* available workspaces (list them with `pybm workspace list`), use the `--all` switch:
58
58
59
59
```shell
60
-
# runs all files in the benchmarks folder in all environments.
60
+
# runs all files in the benchmarks folder in all workspaces.
61
61
pybm run benchmarks --all
62
62
```
63
63
@@ -79,20 +79,20 @@ Instead of the slashes in the file path, you substitute those with dots to refle
79
79
pybm supports running benchmark target files as modules like this:
80
80
81
81
```shell
82
-
# runs the foo benchmark file as a module in the environment named my-env.
83
-
pybm -m benchmarks/foo.py my-env
82
+
# runs the foo benchmark file as a module in the workspace named my-workspace.
83
+
pybm -m benchmarks/foo.py my-workspace
84
84
```
85
85
86
86
Under the hood, this results in a `python -m benchmarks.foo` call, where the Python executable is sourced from the
0 commit comments