README.md 1.18 KB
Newer Older
Raphaël Gomès's avatar
Raphaël Gomès committed
1
2
3
4
5
6
7
8
9
10
# repo-bencher

## Setup

This project requires Python version ``3.6`` or higher.

You need to have a ``repos`` folder at the root of this repository containing (symlinks to) the repositories you want to test. 

> **Note:** No particular care is taken with those repos, but since we're only testing read-only commands, it should be fine for now.

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
You also need the ``config.json`` file at the root of this repository. Here is an example:

```json
{
  "version": 0,
  "executables": {
    "upstream": {
      "path": "/path/to/upstream/hg",
      "env": {
        "HGMODULEPOLICY": "rust+c",
        "RUST_LOG": "trace"
      }
    },
    "jane": {
      "path": "/path/to/hg-jane-fastpath",
      "env": {
        "HGRS_HG": "/path/to/upstream/hg"
      },
      "args": "--no-mmap --no-unclean-cache --profile"
    }
  }
}

```

Raphaël Gomès's avatar
Raphaël Gomès committed
36
37
38
39
## Usage

Run the benchmarks:

40
``./bench.py -x upstream -x jane``
Raphaël Gomès's avatar
Raphaël Gomès committed
41
42
43
44

Results are JSON files in ``results/{repo name}/{executable name}_{url-encoded command}.json``.

For debugging purposes, ``stderr`` and ``stdout`` outputs of the subprocesses are kept in ``logs/{run_uid}/[stdout,stderr]``, with ``{run_uid}`` corresponding to the key of the same name in any JSON results file.