Skip to content

Get the best available time counter for node call duration calculation #4391

@smarie

Description

@smarie

Hi all

In pytest-harvest I provide a function to easily retrieve all information available about test nodes. Among these information, a "duration" is provided (the original from pytest is in seconds, I convert it to ms). However it seems that this number is calculated (in CallInfo) using time(), which is not the most precise tool we have to measure durations in python.

Other built-in possibilities are suggested here.

A good source of inspiration can also be found in pytest-benchmark.

Let me know if it makes sense

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: enhancementnew feature or API change, should be merged into features branch

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions