|
1 | 1 | # HTTPie Benchmarking Infrastructure |
2 | 2 |
|
3 | | -This directory includes the benchmarks we |
4 | | -use for testing HTTPie's speed and the infrastructure |
5 | | -to automate this testing accross versions. |
| 3 | +This directory includes the benchmarks we use for testing HTTPie's speed and the infrastructure to automate this testing accross versions. |
6 | 4 |
|
7 | 5 | ## Usage |
8 | 6 |
|
9 | 7 | Ensure the following requirements are satisfied: |
| 8 | + |
10 | 9 | - Python 3.7+ |
11 | 10 | - `pyperf` |
12 | 11 |
|
13 | 12 | Then, run the `extras/benchmarks/run.py`: |
| 13 | + |
14 | 14 | ``` |
15 | 15 | $ python extras/profiling/run.py |
16 | 16 | ``` |
17 | 17 |
|
18 | | -Without any options, this command will initially create |
19 | | -an isolated environment and install `httpie` from the |
20 | | -latest commit. Then it will create a second environment |
21 | | -with the `master` of the current repository and run the |
22 | | -benchmarks on both of them. It will compare the results |
23 | | -and print it as a markdown table: |
| 18 | +Without any options, this command will initially create an isolated environment and install `httpie` from the latest commit. Then it will create a |
| 19 | +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 |
| 20 | +markdown table: |
24 | 21 |
|
25 | | -| Benchmark | master | this_branch | |
26 | | -|----------------------------------------|:------:|:--------------------:| |
| 22 | +| Benchmark | master | this_branch | |
| 23 | +| -------------------------------------- | :----: | :------------------: | |
27 | 24 | | `http --version` (startup) | 201 ms | 174 ms: 1.16x faster | |
28 | 25 | | `http --offline pie.dev/get` (startup) | 200 ms | 174 ms: 1.15x faster | |
29 | | -| Geometric mean | (ref) | 1.10x faster | |
| 26 | +| Geometric mean | (ref) | 1.10x faster | |
| 27 | + |
| 28 | +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 |
| 29 | +`httpie/httpie` repo from `GitHub` and use it as the baseline. |
30 | 30 |
|
31 | | -If your `master` branch is not up-to-date, you can get |
32 | | -a fresh clone by passing `--fresh` option. This way, |
33 | | -the benchmark runner will clone the `httpie/httpie` repo |
34 | | -from `GitHub` and use it as the baseline. |
| 31 | +You can customize these branches by passing `--local-repo`/`--target-branch`, and customize the repos by passing `--local-repo`/`--target-repo` (can |
| 32 | +either take a URL or a path). |
0 commit comments