1
0
mirror of https://github.com/httpie/cli.git synced 2025-05-19 22:33:19 +02:00

docs: format the benchmark docs

This commit is contained in:
Batuhan Taskaya 2022-01-24 18:20:03 +03:00
parent d5e3611e85
commit 45fcd746d7

View File

@ -1,6 +1,7 @@
# HTTPie Benchmarking Infrastructure # HTTPie Benchmarking Infrastructure
This directory includes the benchmarks we use for testing HTTPie's speed and the infrastructure to automate this testing accross versions. This directory includes the benchmarks we use for testing HTTPie's speed and the
infrastructure to automate this testing accross versions.
## Usage ## Usage
@ -15,9 +16,10 @@ 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 an isolated environment and install `httpie` from the latest commit. Then it will create a Without any options, this command will initially create an isolated environment
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 and install `httpie` from the latest commit. Then it will create a second
markdown table: 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 markdown table:
| Benchmark | master | this_branch | | Benchmark | master | this_branch |
| -------------------------------------- | :----: | :------------------: | | -------------------------------------- | :----: | :------------------: |
@ -25,10 +27,13 @@ markdown table:
| `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 a fresh clone by passing `--fresh` option. This way, the benchmark runner will clone the If your `master` branch is not up-to-date, you can get a fresh clone by passing
`httpie/httpie` repo from `GitHub` and use it as the baseline. `--fresh` option. This way, 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 You can customize these branches by passing `--local-repo`/`--target-branch`,
either take a URL or a path). and customize the repos by passing `--local-repo`/`--target-repo` (can either
take a URL or a path).
If you want to run a third enviroment with additional dependencies (such as `pyOpenSSL`), you can pass `--complex`. If you want to run a third enviroment with additional dependencies (such as
`pyOpenSSL`), you can pass `--complex`.