Skip to content

Conversation

@jqnatividad
Copy link
Collaborator

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors parallel chunk sizing logic in the stats and frequency commands to allow forcing CPU-based chunking via the environment variables QSV_STATS_CHUNK_MEMORY_MB and QSV_FREQ_CHUNK_MEMORY_MB. The refactoring introduces support for setting these variables to -1 to force CPU-based chunking (chunk size = records/number of CPUs) as an alternative to memory-aware chunking.

Key changes:

  • Modified environment variable parsing to support -1 value for forcing CPU-based chunking
  • Refactored chunking logic to consolidate mode determination and logging
  • Updated documentation across command help text, dotenv template, and environment variable docs

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
src/cmd/stats.rs Refactored chunk size calculation logic to support CPU-based chunking when env var is unset or set to invalid value; improved code structure and logging
src/cmd/frequency.rs Applied similar chunking refactor as stats.rs; removed commented-out code
dotenv.template Added documentation for -1 value to force CPU-based chunking for both STATS and FREQ env vars
docs/ENVIRONMENT_VARIABLES.md Updated descriptions for QSV_STATS_CHUNK_MEMORY_MB and QSV_FREQ_CHUNK_MEMORY_MB to document -1 option

jqnatividad and others added 4 commits November 30, 2025 09:14
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@jqnatividad jqnatividad merged commit 6d7bfa3 into master Nov 30, 2025
12 of 13 checks passed
@jqnatividad jqnatividad deleted the dyn-chunk-sizing-force-CPU-based-chunking branch November 30, 2025 14:15
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.

2 participants