Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-29554: Improve docs for pstat module and profile. #88

Merged
merged 2 commits into from
Feb 21, 2017

Conversation

Carreau
Copy link
Contributor

@Carreau Carreau commented Feb 14, 2017

Clarify that methods takes a string which is interpreted as a re, and
not a re object.

Clarify what the old -1, 0, 1 and 2 option were.

bpo-29554

select a percentage of lines), or a regular expression (to pattern match
the standard name that is printed. If several restrictions are provided,
then they are applied sequentially. For example::
select a percentage of lines), or a string that will interpreted as a
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As the rewrapping make a lot of line changes:

or a string that will interpreted as a regular expression

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd recommend redoing the PR as a commit to make the change(s) you want and a commit to rewrap. That way the change can be reviewed more easily.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohhhh ! Why did I never thought of that. Done.

Lib/pstats.py Outdated
minor key of 'the name of the function'. Look at the two tables in
sort_stats() and get_sort_arg_defs(self) for more examples.
addition to the old -1, 0, 1, or 2 that are respectively interpreted as
'stdname', 'calls', 'time', and 'cumulative'). It takes an arbitrary
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add:

that are respectively interpreted as 'stdname', 'calls', 'time', and 'cumulative'

Lib/pstats.py Outdated
number of quoted strings to select the sort order. For example
sort_stats('time', 'name') sorts on the major key of 'internal function
time', and on the minor key of 'the name of the function'. Look at the two
tables in sort_stats() , get_sort_arg_defs(self) and sort_arg_dict_default
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and to , and add and sort_arg_dict_default

@berkerpeksag
Copy link
Member

This requires a new tracker item on bugs.python.org. See step 5 at http://cpython-devguide.readthedocs.io/#quick-start for details.

@Carreau Carreau changed the title Improve docs for pstat module and profile. bpo-29554 : Improve docs for pstat module and profile. Feb 14, 2017
@Carreau
Copy link
Contributor Author

Carreau commented Feb 14, 2017

This requires a new tracker item on bugs.python.org. See step 5 at http://cpython-devguide.readthedocs.io/#quick-start for details.

Thank you, I thought that was minor enough. but done as bpo-29554

the standard name that is printed. If several restrictions are provided,
then they are applied sequentially. For example::
select a percentage of lines), or a string that will interpreted as a
regular expression (to pattern match the standard name that is printed.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't "(to pattern match the standard name that is printed." be end with a closing parenthesis ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Done.

Lib/pstats.py Outdated
'name') sorts on the major key of 'internal function time', and on the
minor key of 'the name of the function'. Look at the two tables in
sort_stats() and get_sort_arg_defs(self) for more examples.
addition to the old -1, 0, 1, or 2 that are respectively interpreted as
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are multiple whitespaces between "respectively interpreted".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good eyes !

Lib/pstats.py Outdated
sort_stats() and get_sort_arg_defs(self) for more examples.
addition to the old -1, 0, 1, or 2 that are respectively interpreted as
'stdname', 'calls', 'time', and 'cumulative'). It takes an arbitrary number
of quoted strings to select the sort order. For example sort_stats('time',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of breaking sort_stats('time', 'name') call I'd move the "For example [...]" sentence to its own paragraph.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done as well.

@berkerpeksag berkerpeksag changed the title bpo-29554 : Improve docs for pstat module and profile. bpo-29554: Improve docs for pstat module and profile. Feb 19, 2017
@codecov
Copy link

codecov bot commented Feb 20, 2017

Codecov Report

Merging #88 into master will decrease coverage by -1.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master      #88      +/-   ##
==========================================
- Coverage   83.38%   82.38%   -1.01%     
==========================================
  Files        1367     1428      +61     
  Lines      344903   351138    +6235     
==========================================
+ Hits       287604   289284    +1680     
- Misses      57299    61854    +4555

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 112ec38...5948aa3. Read the comment docs.

Clarify that methods takes a string which is interpreted as a re, and
not a re object.

Clarify what the old `-1`, `0`, `1` and `2` option were.
Re wrap as a second commit, to make review easier.
@berkerpeksag berkerpeksag merged commit 8fb1f6e into python:master Feb 21, 2017
@berkerpeksag
Copy link
Member

Thanks!

@Carreau Carreau deleted the pstat-docs branch February 21, 2017 16:51
@Carreau
Copy link
Contributor Author

Carreau commented Feb 21, 2017

Thanks, much appreciated.

berkerpeksag pushed a commit to berkerpeksag/cpython that referenced this pull request Feb 21, 2017
Clarify that methods take a string which is interpreted as a regex,
not a regex object.

Also clarify what the old `-1`, `0`, `1` and `2` options were.
(cherry picked from commit 8fb1f6e)
berkerpeksag pushed a commit to berkerpeksag/cpython that referenced this pull request Feb 21, 2017
Clarify that methods take a string which is interpreted as a regex,
not a regex object.

Also clarify what the old `-1`, `0`, `1` and `2` options were.
(cherry picked from commit 8fb1f6e)
berkerpeksag added a commit that referenced this pull request Feb 22, 2017
Clarify that methods take a string which is interpreted as a regex,
not a regex object.

Also clarify what the old `-1`, `0`, `1` and `2` options were.

(cherry picked from commit 8fb1f6e)
berkerpeksag added a commit that referenced this pull request Feb 22, 2017
Clarify that methods take a string which is interpreted as a regex,
not a regex object.

Also clarify what the old `-1`, `0`, `1` and `2` options were.

(cherry picked from commit 8fb1f6e)
akruis pushed a commit to akruis/cpython that referenced this pull request Sep 9, 2017
stackless.current.switch()

Fix an assertion violation caused by incorrect usage of
ts->st.del_post_switch.
Add a test case for "switch to current".

This commit also adds the test class TestTaskletSwitching, which was
only in 2.7-slp.

https://bitbucket.org/stackless-dev/stackless/issues/88
(grafted from f0db3bdf1061, b85b07e9f10effdbf52adc71d452d1e93bd3c5fd, 782a1b292460
and 7d9b4398011f)
colesbury referenced this pull request in colesbury/nogil Oct 6, 2021
The object's thread-id may be zero by the time _Py_queue_object is
called. Get the thread-id before marking the object as queued in
_Py_DecRefShared.

Fixes #88
jaraco added a commit to jaraco/cpython that referenced this pull request Feb 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants