Skip to content
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

test(python): Improved import polars timing test; now much more consistent/reliable #12478

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

alexander-beedie
Copy link
Collaborator

@alexander-beedie alexander-beedie commented Nov 15, 2023

Ref: #12094 (comment).

Improves the test in several ways:

  • Adds an up-front .py.pyc step (fast, only runs once).
  • Factors-out (and fixes!) the "cumulative_time" sort that chooses the fastest run.
  • Early-exits from the test as soon as an import run meets the max allowed time.

Should be much more reliable now.

(Fastest time I saw while testing was ~0.059 secs, so initial import remains extremely fast).

@github-actions github-actions bot added internal An internal refactor or improvement python Related to Python Polars labels Nov 15, 2023
Copy link
Member

@stinodego stinodego left a comment

Choose a reason for hiding this comment

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

Thanks! <3

@stinodego stinodego merged commit 65bfa48 into pola-rs:main Nov 15, 2023
16 checks passed
@stinodego stinodego changed the title test(python): improved import polars timing test; now much more consistent/reliable test(python): Improved import polars timing test; now much more consistent/reliable Nov 15, 2023
@alexander-beedie alexander-beedie deleted the rework-import-timings-test branch November 15, 2023 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal An internal refactor or improvement python Related to Python Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants