Skip to content

Conversation

@happz
Copy link
Contributor

@happz happz commented Jan 15, 2026

Easy to use as an decorator, for ad hoc measurements.

Pull Request Checklist

  • implement the feature
  • extend the test coverage

Easy to use as an decorator, for ad hoc measurements.
@happz happz added this to planning Jan 15, 2026
@happz happz added the ci | full test Pull request is ready for the full test execution label Jan 15, 2026
@github-project-automation github-project-automation bot moved this to backlog in planning Jan 15, 2026
@happz happz moved this from backlog to implement in planning Jan 15, 2026
@LecrisUT
Copy link
Contributor

What are the plans with this, vs running python -m cProfile -m tmt directly?

@happz
Copy link
Contributor Author

happz commented Jan 19, 2026

What are the plans with this, vs running python -m cProfile -m tmt directly?

That will certainly work, but it's terribly noisy. When interested where time is spent during virtual provisioning, decorating only the interesting methods for the sake of investigation seems easier to ingest.

@LecrisUT
Copy link
Contributor

I'm not sure how noisy it would be, it should be just a sub-stack in the flame graph, but probably it would make the code too slow overall and harder to actually create the profile graph.

Comment on lines +136 to +139
_BOOTSTRAP_LOGGER.info(
f"# Profiler report on '{fn.__name__}'",
'\n'.join(profiler.format(sort_stats=sort_stats, limit=limit)),
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we output to a file instead of the logger? At the very least PyCharm would support opening it with Tools -> Open CProfile snapshot

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

Labels

ci | full test Pull request is ready for the full test execution

Projects

Status: implement

Development

Successfully merging this pull request may close these issues.

3 participants