Skip to content

Add the --duration option to the test suite #119050

Description

@Eclips4

Feature or enhancement

Proposal:

I propose adding a new option --duration to our test suite. This would print the duration of each test that has run during the test suite, to the file that the user provides.
So actual use case looks like that:
./python.exe -m test --duration tmp/stats -R 3:3
It's can be useful as the --slowest option, which already exists.

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Linked PRs

Activity

  1. added
    type-featureA feature request or enhancement
    testsTests in the Lib/test dir
    on May 14, 2024
  2. vstinner commented on May 15, 2024

    @vstinner
    Member

    Why not reusing the JUnit output?

  3. Eclips4 commented on May 15, 2024

    @Eclips4
    MemberAuthor

    Why not reusing the JUnit output?

    JUnit cannot be used in a "hunt refleaks" mode. Although, using JUnit for this purpose would be great, but I do not see an easy solution to making it work with the "hunt refleaks" mode :(

  4. vstinner commented on May 17, 2024

    @vstinner
    Member

    JUnit cannot be used in a "hunt refleaks" mode. Although, using JUnit for this purpose would be great, but I do not see an easy solution to making it work with the "hunt refleaks" mode :(

    We should write JUnit data into a file, and then load the file to write the XML. Not store these data into memory.

  5. added 5 commits that reference this issue on May 18, 2024
  6. added 2 commits that reference this issue on May 18, 2024
  7. added 3 commits that reference this issue on May 18, 2024
  8. added a commit that references this issue on May 20, 2024
  9. added a commit that references this issue on May 20, 2024
  10. vstinner commented on May 20, 2024

    @vstinner
    Member

    JUnit cannot be used in a "hunt refleaks" mode. Although, using JUnit for this purpose would be great, but I do not see an easy solution to making it work with the "hunt refleaks" mode :(

    It's now supported! Is it enough for your use case?

  11. Eclips4 commented on May 20, 2024

    @Eclips4
    MemberAuthor

    JUnit cannot be used in a "hunt refleaks" mode. Although, using JUnit for this purpose would be great, but I do not see an easy solution to making it work with the "hunt refleaks" mode :(

    It's now supported! Is it enough for your use case?

    Yes, it is! Thanks Victor!

  12. added 2 commits that reference this issue on May 20, 2024
  13. added 2 commits that reference this issue on Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    testsTests in the Lib/test dirtype-featureA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions