[Updated] D8603: rust: add a pointer for profiling to the README

valentin.gatienbaron (Valentin Gatien-Baron) phabricator at mercurial-scm.org
Mon Jun 1 15:48:26 UTC 2020


Closed by commit rHG7ca1d635e4a6: rust: add a pointer for profiling to the README (authored by valentin.gatienbaron).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D8603?vs=21538&id=21542

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D8603/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D8603

AFFECTED FILES
  rust/README.rst

CHANGE DETAILS

diff --git a/rust/README.rst b/rust/README.rst
--- a/rust/README.rst
+++ b/rust/README.rst
@@ -34,6 +34,21 @@
 One day we may use this environment variable to switch to new experimental
 binding crates like a hypothetical ``HGWITHRUSTEXT=hpy``.
 
+Profiling
+=========
+
+Setting the environment variable ``RUST_LOG=trace`` will make hg print
+a few high level rust-related performance numbers. It can also
+indicate why the rust code cannot be used (say, using lookarounds in
+hgignore).
+
+``py-spy`` (https://github.com/benfred/py-spy) can be used to
+construct a single profile with rust functions and python functions
+(as opposed to ``hg --profile``, which attributes time spent in rust
+to some unlucky python code running shortly after the rust code, and
+as opposed to tools for native code like ``perf``, which attribute
+time to the python interpreter instead of python functions).
+
 Developing Rust
 ===============
 



To: valentin.gatienbaron, #hg-reviewers
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20200601/853ad153/attachment.html>


More information about the Mercurial-patches mailing list