Skip to content

Reduce data size in tests with perf issues#27168

Merged
CraigMacomber merged 1 commit into
microsoft:mainfrom
CraigMacomber:smallerCOrrectness
Apr 24, 2026
Merged

Reduce data size in tests with perf issues#27168
CraigMacomber merged 1 commit into
microsoft:mainfrom
CraigMacomber:smallerCOrrectness

Conversation

@CraigMacomber
Copy link
Copy Markdown
Contributor

Description

Something is causing these tests, at least the execution time ones, to be much slower when run as part of the full test suite instead of by themselves.

This is causing non-determinstic timouts on CI.

THis change reduces the data size to hopefully mitigate the issue while it is properly investigated and fixed.

Reviewer Guidance

The review process is outlined on this wiki page.

Copilot AI review requested due to automatic review settings April 24, 2026 22:22
@CraigMacomber CraigMacomber requested a review from a team as a code owner April 24, 2026 22:22
@github-actions
Copy link
Copy Markdown
Contributor

Hi! Thank you for opening this PR. Want me to review it?

Based on the diff (8 lines, 2 files), I've queued these reviewers:

  • Correctness — logic errors, race conditions, lifecycle issues
  • Security — vulnerabilities, secret exposure, injection
  • API Compatibility — breaking changes, release tags, type design
  • Performance — algorithmic regressions, memory leaks
  • Testing — coverage gaps, hollow tests

Toggle the reviewer checkboxes above to adjust, then tick the box below to start:

  • Start review

Copy link
Copy Markdown
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

Adjusts SharedTree table benchmark/test parameters to reduce runtime in CI by lowering the default (non-performance-mode) table size and operation counts, mitigating intermittent timeouts when running the full test suite.

Changes:

  • Reduce non-perf tableSizes from [5] to [3] in table execution-time benchmarks.
  • Reduce non-perf operationCounts from [5] to [3] in table execution-time benchmarks.
  • Apply the same non-perf reductions to the corresponding memory-usage benchmarks.

Reviewed changes

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

File Description
packages/dds/tree/src/test/shared-tree/tableTree.bench.ts Lowers default (non-perf) table size and operation count to reduce benchmark runtime during regular test runs.
packages/dds/tree/src/test/memory/tableTree.spec.ts Lowers default (non-perf) table size and operation count to reduce memory benchmark runtime during regular test runs.

Comment on lines 96 to +101
// The test tree's size will be 5*5, 50*50.
// Table size 1000 benchmarks removed due to high overhead and unreliable results.
const tableSizes = isInPerformanceTestingMode
? [5, 50]
: // When not measuring perf, use a single smaller data size so the tests run faster.
[5];
[3];
Copy link

Copilot AI Apr 24, 2026

Choose a reason for hiding this comment

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

The comment says the test tree size will be 5×5 and 50×50, but in non-performance mode this now runs with a 3×3 table. Please update the comment to reflect the two modes (perf vs non-perf) to avoid confusion when reading results.

Copilot uses AI. Check for mistakes.
Comment on lines 78 to +83
// The test tree's size will be 5*5, 50*50.
// Tree size 1000 benchmarks removed due to high overhead and unreliable results.
const tableSizes = isInPerformanceTestingMode
? [5, 50]
: // When not measuring perf, use a single smaller data size so the tests run faster.
[5];
[3];
Copy link

Copilot AI Apr 24, 2026

Choose a reason for hiding this comment

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

The comment indicates the test tree sizes will be 5×5 and 50×50, but in non-performance mode this now uses a 3×3 table. Please adjust the comment to describe both perf and non-perf modes so the chosen sizes are clear.

Copilot uses AI. Check for mistakes.
@CraigMacomber CraigMacomber enabled auto-merge (squash) April 24, 2026 22:34
@CraigMacomber CraigMacomber merged commit fa110db into microsoft:main Apr 24, 2026
35 checks passed
@CraigMacomber CraigMacomber deleted the smallerCOrrectness branch April 27, 2026 16:13
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.

3 participants