Skip to content

Make it possible to collect pystats of parts of runs #100143

Closed
@mdboom

Description

@mdboom

The --enable-pystats system has a couple of important shortcomings:

  • When stats is turned off, stats aren't dumped (on quit or explicitly). Therefore, it's impossible to put sys._stats_on/sys._stats_off calls around tested code and get the results out.
  • Since stats collection is on by default, it is very fiddly to exclude code for stats, especially for things that fire off subprocesses, e.g. pyperformance.

@markshannon's suggestion is to:

  • Having stats off by default
  • Add an -Xstats flag to turn it on at startup
  • Always dump out stats

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions