mirror of
https://github.com/httpie/cli.git
synced 2024-11-24 08:22:22 +02:00
docs: add --{local, target}-{repo, branch} / format
This commit is contained in:
parent
640901146f
commit
df6843b15a
@ -1,34 +1,32 @@
|
|||||||
# HTTPie Benchmarking Infrastructure
|
# HTTPie Benchmarking Infrastructure
|
||||||
|
|
||||||
This directory includes the benchmarks we
|
This directory includes the benchmarks we use for testing HTTPie's speed and the infrastructure to automate this testing accross versions.
|
||||||
use for testing HTTPie's speed and the infrastructure
|
|
||||||
to automate this testing accross versions.
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
Ensure the following requirements are satisfied:
|
Ensure the following requirements are satisfied:
|
||||||
|
|
||||||
- Python 3.7+
|
- Python 3.7+
|
||||||
- `pyperf`
|
- `pyperf`
|
||||||
|
|
||||||
Then, run the `extras/benchmarks/run.py`:
|
Then, run the `extras/benchmarks/run.py`:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ python extras/profiling/run.py
|
$ python extras/profiling/run.py
|
||||||
```
|
```
|
||||||
|
|
||||||
Without any options, this command will initially create
|
Without any options, this command will initially create an isolated environment and install `httpie` from the latest commit. Then it will create a
|
||||||
an isolated environment and install `httpie` from the
|
second environment with the `master` of the current repository and run the benchmarks on both of them. It will compare the results and print it as a
|
||||||
latest commit. Then it will create a second environment
|
markdown table:
|
||||||
with the `master` of the current repository and run the
|
|
||||||
benchmarks on both of them. It will compare the results
|
|
||||||
and print it as a markdown table:
|
|
||||||
|
|
||||||
| Benchmark | master | this_branch |
|
| Benchmark | master | this_branch |
|
||||||
|----------------------------------------|:------:|:--------------------:|
|
| -------------------------------------- | :----: | :------------------: |
|
||||||
| `http --version` (startup) | 201 ms | 174 ms: 1.16x faster |
|
| `http --version` (startup) | 201 ms | 174 ms: 1.16x faster |
|
||||||
| `http --offline pie.dev/get` (startup) | 200 ms | 174 ms: 1.15x faster |
|
| `http --offline pie.dev/get` (startup) | 200 ms | 174 ms: 1.15x faster |
|
||||||
| Geometric mean | (ref) | 1.10x faster |
|
| Geometric mean | (ref) | 1.10x faster |
|
||||||
|
|
||||||
If your `master` branch is not up-to-date, you can get
|
If your `master` branch is not up-to-date, you can get a fresh clone by passing `--fresh` option. This way, the benchmark runner will clone the
|
||||||
a fresh clone by passing `--fresh` option. This way,
|
`httpie/httpie` repo from `GitHub` and use it as the baseline.
|
||||||
the benchmark runner will clone the `httpie/httpie` repo
|
|
||||||
from `GitHub` and use it as the baseline.
|
You can customize these branches by passing `--local-repo`/`--target-branch`, and customize the repos by passing `--local-repo`/`--target-repo` (can
|
||||||
|
either take a URL or a path).
|
||||||
|
Loading…
Reference in New Issue
Block a user