[yt-svn] commit/yt: jzuhone: Merged in ngoldbaum/yt/yt-3.0 (pull request #910)

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Mon May 19 06:39:30 PDT 2014


1 new commit in yt:

https://bitbucket.org/yt_analysis/yt/commits/7a08af110b44/
Changeset:   7a08af110b44
Branch:      yt-3.0
User:        jzuhone
Date:        2014-05-19 15:39:23
Summary:     Merged in ngoldbaum/yt/yt-3.0 (pull request #910)

Adding a docstring for parallel_profile.
Affected #:  1 file

diff -r 42232180162bb8d2c5280b874f6ba4c17e4bfe2f -r 7a08af110b448af6365b9167f0d3a9db019719aa yt/funcs.py
--- a/yt/funcs.py
+++ b/yt/funcs.py
@@ -622,6 +622,22 @@
 
 @contextlib.contextmanager
 def parallel_profile(prefix):
+    r"""A context manager for profiling parallel code execution using cProfile
+
+    This is a simple context manager that automatically profiles the execution
+    of a snippet of code.
+
+    Parameters
+    ----------
+    prefix : string
+        A string name to prefix outputs with.
+
+    Examples
+    --------
+
+    >>> with parallel_profile('my_profile'):
+    ...     yt.PhasePlot(ds.all_data(), 'density', 'temperature', 'cell_mass')
+    """
     import cProfile
     from yt.config import ytcfg
     fn = "%s_%04i_%04i.cprof" % (prefix,

Repository URL: https://bitbucket.org/yt_analysis/yt/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.



More information about the yt-svn mailing list