Skip to content

feat(expr-eval): Fix flaky adaptiveCpuSamplingPerFunctionRates test (#17002)#17002

Closed
Rajeev975 wants to merge 1 commit intofacebookincubator:mainfrom
Rajeev975:export-D99126870
Closed

feat(expr-eval): Fix flaky adaptiveCpuSamplingPerFunctionRates test (#17002)#17002
Rajeev975 wants to merge 1 commit intofacebookincubator:mainfrom
Rajeev975:export-D99126870

Conversation

@Rajeev975
Copy link
Copy Markdown
Contributor

@Rajeev975 Rajeev975 commented Apr 1, 2026

Summary:

Previous diff (#16646) had a flaky test because the test asserted that slow_add must be in kAlwaysTrack state and plus must be in kSampling state. Replaced absolute state assertions with a relative comparison: slow_add sampling rate must be ≤ plus sampling rate. This is robust because both functions share the same timerOverheadNanos_ per ExprSet, so measurement noise affects both equally and cannot flip the relative ordering.

Reviewed By: pedroerp

Differential Revision: D99126870

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 1, 2026

Deploy Preview for meta-velox canceled.

Name Link
🔨 Latest commit c53dfda
🔍 Latest deploy log https://app.netlify.com/projects/meta-velox/deploys/69d01e1ad138f800083cd11b

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 1, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync bot commented Apr 1, 2026

@Rajeev975 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D99126870.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

Build Impact Analysis

Selective Build Targets (building these covers all 1 affected)

cmake --build _build/release --target velox_expression_test

Total affected: 1/557 targets

Affected targets (1)

Directly changed (1)

Target Changed Files
velox_expression_test ExprStatsTest.cpp

Fast path • Graph from main@b65b5c1c56942f7ef34c3e34fb641e50229266cf

Rajeev975 added a commit to Rajeev975/velox that referenced this pull request Apr 1, 2026
…ion evaluation (facebookincubator#17002)

Summary:
Pull Request resolved: facebookincubator#17002

This is similar to facebookincubator#16646

Previous landing was reverted because the test asserted that slow_add must be in kAlwaysTrack state and plus must be in kSampling state.  Replaced absolute state assertions with a relative comparison: slow_add sampling rate must be ≤ plus sampling rate. This is robust because both functions share the same timerOverheadNanos_ per ExprSet, so measurement noise affects both equally and cannot flip the relative ordering.

Differential Revision: D99126870
@meta-codesync meta-codesync bot changed the title feat(expr-eval): Adaptive per-function CPU sampling for Velox expression evaluation feat(expr-eval): Adaptive per-function CPU sampling for Velox expression evaluation (#17002) Apr 1, 2026
Rajeev975 added a commit to Rajeev975/velox that referenced this pull request Apr 1, 2026
…ion evaluation (facebookincubator#17002)

Summary:
Pull Request resolved: facebookincubator#17002

This is similar to facebookincubator#16646

Previous landing was reverted because the test asserted that slow_add must be in kAlwaysTrack state and plus must be in kSampling state.  Replaced absolute state assertions with a relative comparison: slow_add sampling rate must be ≤ plus sampling rate. This is robust because both functions share the same timerOverheadNanos_ per ExprSet, so measurement noise affects both equally and cannot flip the relative ordering.

Differential Revision: D99126870
@Rajeev975
Copy link
Copy Markdown
Contributor Author

Will add another stress test to verify that adaptiveCpuSamplingPerFunctionRates is not flaky

Rajeev975 added a commit to Rajeev975/velox that referenced this pull request Apr 1, 2026
…ion evaluation (facebookincubator#17002)

Summary:
Pull Request resolved: facebookincubator#17002

This is similar to facebookincubator#16646

Previous landing was reverted because the test asserted that slow_add must be in kAlwaysTrack state and plus must be in kSampling state.  Replaced absolute state assertions with a relative comparison: slow_add sampling rate must be ≤ plus sampling rate. This is robust because both functions share the same timerOverheadNanos_ per ExprSet, so measurement noise affects both equally and cannot flip the relative ordering.

Differential Revision: D99126870
Rajeev975 added a commit to Rajeev975/velox that referenced this pull request Apr 1, 2026
…ion evaluation (facebookincubator#17002)

Summary:
Pull Request resolved: facebookincubator#17002

This is similar to facebookincubator#16646

Previous landing was reverted because the test asserted that slow_add must be in kAlwaysTrack state and plus must be in kSampling state.  Replaced absolute state assertions with a relative comparison: slow_add sampling rate must be ≤ plus sampling rate. This is robust because both functions share the same timerOverheadNanos_ per ExprSet, so measurement noise affects both equally and cannot flip the relative ordering.

Differential Revision: D99126870
Rajeev975 added a commit to Rajeev975/velox that referenced this pull request Apr 1, 2026
…ion evaluation (facebookincubator#17002)

Summary:
Pull Request resolved: facebookincubator#17002

This is similar to facebookincubator#16646

Previous landing was reverted because the test asserted that slow_add must be in kAlwaysTrack state and plus must be in kSampling state.  Replaced absolute state assertions with a relative comparison: slow_add sampling rate must be ≤ plus sampling rate. This is robust because both functions share the same timerOverheadNanos_ per ExprSet, so measurement noise affects both equally and cannot flip the relative ordering.

Differential Revision: D99126870
@Rajeev975 Rajeev975 force-pushed the export-D99126870 branch 2 times, most recently from 0f2b7b5 to d76b1c3 Compare April 1, 2026 18:26
Rajeev975 added a commit to Rajeev975/velox that referenced this pull request Apr 1, 2026
…ion evaluation (facebookincubator#17002)

Summary:
Pull Request resolved: facebookincubator#17002

This is similar to facebookincubator#16646

Previous landing was reverted because the test asserted that slow_add must be in kAlwaysTrack state and plus must be in kSampling state.  Replaced absolute state assertions with a relative comparison: slow_add sampling rate must be ≤ plus sampling rate. This is robust because both functions share the same timerOverheadNanos_ per ExprSet, so measurement noise affects both equally and cannot flip the relative ordering.

Differential Revision: D99126870
@Rajeev975 Rajeev975 marked this pull request as draft April 2, 2026 16:38
Rajeev975 added a commit to Rajeev975/velox that referenced this pull request Apr 3, 2026
…ion evaluation (facebookincubator#17002)

Summary:
Pull Request resolved: facebookincubator#17002

This is similar to facebookincubator#16646

Previous landing was reverted because the test asserted that slow_add must be in kAlwaysTrack state and plus must be in kSampling state.  Replaced absolute state assertions with a relative comparison: slow_add sampling rate must be ≤ plus sampling rate. This is robust because both functions share the same timerOverheadNanos_ per ExprSet, so measurement noise affects both equally and cannot flip the relative ordering.

Differential Revision: D99126870
Rajeev975 added a commit to Rajeev975/velox that referenced this pull request Apr 3, 2026
…ion evaluation (facebookincubator#17002)

Summary:
Pull Request resolved: facebookincubator#17002

This is similar to facebookincubator#16646

Previous landing was reverted because the test asserted that slow_add must be in kAlwaysTrack state and plus must be in kSampling state.  Replaced absolute state assertions with a relative comparison: slow_add sampling rate must be ≤ plus sampling rate. This is robust because both functions share the same timerOverheadNanos_ per ExprSet, so measurement noise affects both equally and cannot flip the relative ordering.

Differential Revision: D99126870
Rajeev975 added a commit to Rajeev975/velox that referenced this pull request Apr 3, 2026
…acebookincubator#17002)

Summary:
Pull Request resolved: facebookincubator#17002

Previous diff (facebookincubator#16646) had a flaky test because the test asserted that slow_add must be in kAlwaysTrack state and plus must be in kSampling state. Replaced absolute state assertions with a relative comparison: slow_add sampling rate must be ≤ plus sampling rate. This is robust because both functions share the same timerOverheadNanos_ per ExprSet, so measurement noise affects both equally and cannot flip the relative ordering.

Differential Revision: D99126870
@meta-codesync meta-codesync bot changed the title feat(expr-eval): Adaptive per-function CPU sampling for Velox expression evaluation (#17002) feat(expr-eval): Fix flaky adaptiveCpuSamplingPerFunctionRates test (#17002) Apr 3, 2026
Rajeev975 added a commit to Rajeev975/velox that referenced this pull request Apr 3, 2026
…acebookincubator#17002)

Summary:
Pull Request resolved: facebookincubator#17002

Previous diff (facebookincubator#16646) had a flaky test because the test asserted that slow_add must be in kAlwaysTrack state and plus must be in kSampling state. Replaced absolute state assertions with a relative comparison: slow_add sampling rate must be ≤ plus sampling rate. This is robust because both functions share the same timerOverheadNanos_ per ExprSet, so measurement noise affects both equally and cannot flip the relative ordering.

Differential Revision: D99126870
Copy link
Copy Markdown
Contributor

@pedroerp pedroerp left a comment

Choose a reason for hiding this comment

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

Thanks @Rajeev975 . Please revert the documentation comment slashes change first.

Rajeev975 added a commit to Rajeev975/velox that referenced this pull request Apr 3, 2026
…acebookincubator#17002)

Summary:

Previous diff (facebookincubator#16646) had a flaky test because the test asserted that slow_add must be in kAlwaysTrack state and plus must be in kSampling state. Replaced absolute state assertions with a relative comparison: slow_add sampling rate must be ≤ plus sampling rate. This is robust because both functions share the same timerOverheadNanos_ per ExprSet, so measurement noise affects both equally and cannot flip the relative ordering.

Reviewed By: pedroerp

Differential Revision: D99126870
Rajeev975 added a commit to Rajeev975/velox that referenced this pull request Apr 3, 2026
…acebookincubator#17002)

Summary:
Pull Request resolved: facebookincubator#17002

Previous diff (facebookincubator#16646) had a flaky test because the test asserted that slow_add must be in kAlwaysTrack state and plus must be in kSampling state. Replaced absolute state assertions with a relative comparison: slow_add sampling rate must be ≤ plus sampling rate. This is robust because both functions share the same timerOverheadNanos_ per ExprSet, so measurement noise affects both equally and cannot flip the relative ordering.

Reviewed By: pedroerp

Differential Revision: D99126870
Rajeev975 added a commit to Rajeev975/velox that referenced this pull request Apr 3, 2026
…acebookincubator#17002)

Summary:
Pull Request resolved: facebookincubator#17002

Previous diff (facebookincubator#16646) had a flaky test because the test asserted that slow_add must be in kAlwaysTrack state and plus must be in kSampling state. Replaced absolute state assertions with a relative comparison: slow_add sampling rate must be ≤ plus sampling rate. This is robust because both functions share the same timerOverheadNanos_ per ExprSet, so measurement noise affects both equally and cannot flip the relative ordering.

Reviewed By: pedroerp

Differential Revision: D99126870
@Rajeev975 Rajeev975 force-pushed the export-D99126870 branch 2 times, most recently from edf9acb to df52e01 Compare April 3, 2026 20:04
Rajeev975 added a commit to Rajeev975/velox that referenced this pull request Apr 3, 2026
…acebookincubator#17002)

Summary:

Previous diff (facebookincubator#16646) had a flaky test because the test asserted that slow_add must be in kAlwaysTrack state and plus must be in kSampling state. Replaced absolute state assertions with a relative comparison: slow_add sampling rate must be ≤ plus sampling rate. This is robust because both functions share the same timerOverheadNanos_ per ExprSet, so measurement noise affects both equally and cannot flip the relative ordering.

Reviewed By: pedroerp

Differential Revision: D99126870
…acebookincubator#17002)

Summary:
Pull Request resolved: facebookincubator#17002

Previous diff (facebookincubator#16646) had a flaky test because the test asserted that slow_add must be in kAlwaysTrack state and plus must be in kSampling state. Replaced absolute state assertions with a relative comparison: slow_add sampling rate must be ≤ plus sampling rate. This is robust because both functions share the same timerOverheadNanos_ per ExprSet, so measurement noise affects both equally and cannot flip the relative ordering.

Reviewed By: pedroerp

Differential Revision: D99126870
@Rajeev975 Rajeev975 marked this pull request as ready for review April 3, 2026 21:42
@meta-codesync meta-codesync bot closed this in 7ea5609 Apr 4, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync bot commented Apr 4, 2026

This pull request has been merged in 7ea5609.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants