From 6b5d96da7231102dc0a015255e6405037a1e4aea Mon Sep 17 00:00:00 2001 From: Batuhan Taskaya Date: Mon, 24 Jan 2022 18:11:09 +0300 Subject: [PATCH] Describe the usage for benchmarks --- extras/profiling/README.md | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/extras/profiling/README.md b/extras/profiling/README.md index 4548c400..4e3c8588 100644 --- a/extras/profiling/README.md +++ b/extras/profiling/README.md @@ -6,8 +6,25 @@ to automate this testing accross versions. ## Usage -### Requirements - +Ensure the following requirements are satisfied: - Python 3.7+ - `pyperf` +Then, run the `extras/benchmarks/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 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 markdown table: + +| Benchmark | master | this_branch | +|----------------------------------------|:------:|:--------------------:| +| `http --version` (startup) | 201 ms | 174 ms: 1.16x faster | +| `http --offline pie.dev/get` (startup) | 200 ms | 174 ms: 1.15x faster | +| Geometric mean | (ref) | 1.10x faster | +