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

Enable timer for nosetests #1771

Merged
merged 2 commits into from
Feb 3, 2020
Merged

Enable timer for nosetests #1771

merged 2 commits into from
Feb 3, 2020

Conversation

pgombar
Copy link
Contributor

@pgombar pgombar commented Jan 31, 2020

Description

Enable nose-timer, a plugin for nosetests that outputs the execution time of each test. This can help us identify and optimize slow running tests. The plugin is compatible with Python 2.7+.

Check out the Travis run on this PR for an example output.


PR information

  • The title of the PR is clear and informative.
  • There are a small number of commits, each of which has an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
  • Except for special cases involving multiple contributors, the PR is started from a fork of the main repository, not a branch.
  • If applicable, the PR references the bug/issue that it fixes in the description.
  • New Unit tests were added for the changes made and Travis.CI is passing.

Quality of Code and Contribution Guidelines


This change is Reviewable

@codecov
Copy link

codecov bot commented Jan 31, 2020

Codecov Report

Merging #1771 into develop will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1771      +/-   ##
===========================================
- Coverage    68.65%   68.64%   -0.01%     
===========================================
  Files           82       82              
  Lines        11732    11732              
  Branches      1645     1645              
===========================================
- Hits          8055     8054       -1     
  Misses        3326     3326              
- Partials       351      352       +1
Impacted Files Coverage Δ
azurelinuxagent/common/protocol/wire.py 77.68% <0%> (-0.1%) ⬇️

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 780a504...a085c73. Read the comment docs.

Copy link
Member

@narrieta narrieta left a comment

Choose a reason for hiding this comment

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

thanks!
do you know how to enable this on pycharm?

@pgombar
Copy link
Contributor Author

pgombar commented Feb 2, 2020

thanks!
do you know how to enable this on pycharm?

  1. install the package nose-timer. in pycharm, go to Preferences > Project > Project Interpreter and search for it there.
  2. set the command-line argument --with-timer in the Run/Debug Configurations menu like so:
    image

@pgombar pgombar merged commit 5148ced into Azure:develop Feb 3, 2020
@pgombar pgombar deleted the test_timer branch February 3, 2020 18:59
@vrdmr
Copy link
Member

vrdmr commented Feb 3, 2020

@narrieta - We actually don't need a specific time by nose as pycharm already shows the time used by each test.

image

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.

3 participants