equal
deleted
inserted
replaced
31 If the environment variable ``HGWITHRUSTEXT=cpython`` is set, the Rust |
31 If the environment variable ``HGWITHRUSTEXT=cpython`` is set, the Rust |
32 extension will be used by default unless ``--no-rust``. |
32 extension will be used by default unless ``--no-rust``. |
33 |
33 |
34 One day we may use this environment variable to switch to new experimental |
34 One day we may use this environment variable to switch to new experimental |
35 binding crates like a hypothetical ``HGWITHRUSTEXT=hpy``. |
35 binding crates like a hypothetical ``HGWITHRUSTEXT=hpy``. |
|
36 |
|
37 Profiling |
|
38 ========= |
|
39 |
|
40 Setting the environment variable ``RUST_LOG=trace`` will make hg print |
|
41 a few high level rust-related performance numbers. It can also |
|
42 indicate why the rust code cannot be used (say, using lookarounds in |
|
43 hgignore). |
|
44 |
|
45 ``py-spy`` (https://github.com/benfred/py-spy) can be used to |
|
46 construct a single profile with rust functions and python functions |
|
47 (as opposed to ``hg --profile``, which attributes time spent in rust |
|
48 to some unlucky python code running shortly after the rust code, and |
|
49 as opposed to tools for native code like ``perf``, which attribute |
|
50 time to the python interpreter instead of python functions). |
36 |
51 |
37 Developing Rust |
52 Developing Rust |
38 =============== |
53 =============== |
39 |
54 |
40 The current version of Rust in use is ``1.34.2``, because it's what Debian |
55 The current version of Rust in use is ``1.34.2``, because it's what Debian |