Skip to content

pytest-profiling: ability to have a svg output per test #78

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

Open
benjaminrigaud opened this issue Mar 7, 2018 · 3 comments
Open

pytest-profiling: ability to have a svg output per test #78

benjaminrigaud opened this issue Mar 7, 2018 · 3 comments

Comments

@benjaminrigaud
Copy link

Hello,

I had to debug some strange warmup behaviors yesterday and I needed to compare two runs (with --count=2) to be able to understand the issue.

More generally, It looks like a nice addition to be able to have one svg output per test.

What is your view on that?

Ben

@eeaston
Copy link
Collaborator

eeaston commented Mar 8, 2018

I think this is a great idea!
We could control it with a command-line switch, how does this sound? I'm taking a leaf here from pytest's fixture scoping to control what the output is:

py.test test_foo.py    # combined output
py.test --profile-scope=session  # same as above
py.test --profile-scope=function  # one SVG per function
py.test --profile-scope=module   # one SVG per module 

@benjaminrigaud
Copy link
Author

benjaminrigaud commented Mar 8, 2018

The scope parameter idea is really great 👍

But am not sure we would be able to have the finest granularity with a function scope.

We would need a "call" scope like they imagined in pytest-dev/pytest#2833
that would be a parametrized instance of a test / function.

Does that make sense?

edit: I may have misunderstood the call scope idea and how behave the function scope :)

@jayvdb
Copy link

jayvdb commented Jun 20, 2018

A module scope would be very useful for @coala , especially if it works without the SVG, i.e. a pstats printout per module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants