[prev in list] [next in list] [prev in thread] [next in thread]
List: mercurial-devel
Subject: D8603: rust: add a pointer for profiling to the README
From: "valentin.gatienbaron (Valentin Gatien-Baron)" <phabricator () mercurial-scm ! org>
Date: 2020-05-30 16:56:58
Message-ID: differential-rev-PHID-DREV-knc2nvaqg3fog2j3xvwv-req () mercurial-scm ! org
[Download RAW message or body]
valentin.gatienbaron created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REVISION SUMMARY
As figuring out how to get useful profiles is not obvious.
REPOSITORY
rHG Mercurial
BRANCH
default
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, mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic