Skip to content

Closes #4682: Refactor parquet-fixed-strings benchmark to use pytest… - #4683

Merged
ajpotts merged 1 commit into
Bears-R-Us:masterfrom
ajpotts:4682_Refactor_parquet-fixed-strings_benchmark_to_use_pytest_framework
Jul 10, 2025
Merged

ajpotts merged 1 commit into
Bears-R-Us:masterfrom
ajpotts:4682_Refactor_parquet-fixed-strings_benchmark_to_use_pytest_framework

Conversation

@ajpotts

@ajpotts ajpotts commented Jun 25, 2025 •

Copy link
Copy Markdown
Contributor

PR: Refactor parquet-fixed-strings.py for Pytest-Benchmark Framework

This PR refactors the original script-based benchmark into a parameterized pytest-benchmark test for standardized performance testing of fixed-length string reads from Parquet files.

✅ Key Improvements

  • Benchmark Group: ParquetFixedStrings

  • Parameters:

    • nfiles: number of files (1, 5, 10)
    • scaling: scale down file size per shard (True/False)
    • fixed: use fixed_len when reading Parquet files (True/False)
  • Benchmark Timing:

    • Uses benchmark.pedantic(...) for consistent trial-based timing
    • Skips during --numpy and --correctness_only runs
  • Temporary Directory Isolation:

    • Uses tmp_path fixture to write files for isolated test execution
  • Metadata:

    • Problem size, number of files, fixed flag, scaling, and transfer rates are recorded
  • IO Benchmark File Cleanup

    • _remove_files adds capability to remove directories as well as files.

This provides consistent, scalable performance benchmarking of Arkouda’s Parquet I/O read with fixed-length string options.

Closes #4682: Refactor parquet-fixed-strings benchmark to use pytest framework

@ajpotts
ajpotts force-pushed the 4682_Refactor_parquet-fixed-strings_benchmark_to_use_pytest_framework branch 4 times, most recently from 7267f24 to d963e1f Compare July 1, 2025 00:39
@ajpotts
ajpotts force-pushed the 4682_Refactor_parquet-fixed-strings_benchmark_to_use_pytest_framework branch 3 times, most recently from b8f8a4e to 2b0e89f Compare July 8, 2025 21:56
@ajpotts
ajpotts marked this pull request as ready for review July 8, 2025 23:08
@ajpotts
ajpotts force-pushed the 4682_Refactor_parquet-fixed-strings_benchmark_to_use_pytest_framework branch from 2b0e89f to a3ce74f Compare July 10, 2025 14:24

@drculhane drculhane left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks solid.

@jaketrookman jaketrookman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good

@ajpotts
ajpotts added this pull request to the merge queue Jul 10, 2025
Merged via the queue into Bears-R-Us:master with commit 7617236 Jul 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor parquet-fixed-strings benchmark to use pytest framework

4 participants