Skip to content

perf: add and harden synthetic scale-test suite#3038

Open
Arths17 wants to merge 6 commits intofacebook:mainfrom
Arths17:perf-stress-suite
Open

perf: add and harden synthetic scale-test suite#3038
Arths17 wants to merge 6 commits intofacebook:mainfrom
Arths17:perf-stress-suite

Conversation

@Arths17
Copy link
Copy Markdown
Contributor

@Arths17 Arths17 commented Apr 7, 2026

Summary

  • add a synthetic performance stress-test suite under tests/perf/scale_test
  • include generator-driven modules with dense typing, inheritance chains, and import mesh patterns
  • improve generated service transact typing with explicit callable-fallback wrapper usage and value narrowing
  • make tests/README.md portable for public contributors (cross-platform Python invocation guidance)
  • remove tracked __pycache__ bytecode artifacts from the stress-test package

Validation

  • python3 test.py --no-test --no-conformance --no-jsonschema
  • python -m py_compile tests/perf/scale_test/generate_stress_test.py
  • additional local lint/format passes during iteration (ruff, flake8, autopep8)

Notes

  • this change targets stress/perf coverage and docs ergonomics, not runtime feature behavior

Copilot AI review requested due to automatic review settings April 7, 2026 04:29
@meta-cla meta-cla bot added the cla signed label Apr 7, 2026
Copy link
Copy Markdown

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

Adds a synthetic, generator-driven Python “scale test” workload under tests/perf/scale_test to stress Pyrefly indexing/type-solving performance, plus contributor-facing documentation for running/regenerating the suite.

Changes:

  • Introduces a deterministic generator script to produce a dense import mesh, deep inheritance chains, and heavily-typed service/protocol APIs.
  • Checks in the baseline (“core-only”) generated modules for immediate use.
  • Adds tests/README.md describing the perf suite structure and cross-platform invocation guidance.

Reviewed changes

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

Show a summary per file
File Description
tests/README.md Documents the synthetic perf suite, how to run the generator, and expected outputs.
tests/perf/scale_test/generate_stress_test.py Generator for producing the synthetic module graph and baseline core modules.
tests/perf/scale_test/init.py Package initializer exporting the baseline core modules.
tests/perf/scale_test/base_types.py Checked-in generated core module used as baseline perf workload input.
tests/perf/scale_test/data_layer.py Checked-in generated core module used as baseline perf workload input.
tests/perf/scale_test/service_mesh.py Checked-in generated core module used as baseline perf workload input.
tests/perf/scale_test/domain_models.py Checked-in generated core module used as baseline perf workload input.
tests/perf/scale_test/orchestration.py Checked-in generated core module used as baseline perf workload input.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions github-actions bot added size/xl and removed size/xl labels Apr 7, 2026
@Arths17
Copy link
Copy Markdown
Contributor Author

Arths17 commented Apr 7, 2026

For the reviewer: Although the line count is large (+13k), 99% of this PR consists of generated Python modules under tests/perf/scale_test/.

I recommend focusing your review on:

  1. generate_stress_test.py: This is the logic that drives the suite.
  2. tests/README.md: The documentation for how to use this suite.
  3. base_types.py: A representative sample of what the generated code looks like (typing density, circular imports, etc.).

Everything else is synthetic data for benchmarking the indexing engine.

@github-actions github-actions bot added size/xl and removed size/xl labels Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants