Skip to content

Conversation

@leaysgur
Copy link
Member

@leaysgur leaysgur commented Nov 13, 2025

Fixes #15628

  • Remove unused TestFiles::react()
  • Refactor private function to be inlined
  • Add formatter fixtures
  • Expand timeout 5 > 10s

Copilot AI review requested due to automatic review settings November 13, 2025 02:40
Copy link
Member Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copilot finished reviewing on behalf of leaysgur November 13, 2025 02:41
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 updates the formatter benchmark fixtures by introducing a dedicated formatter() method with a curated set of test files spanning various sizes and file types, and refactors existing test file methods for consistency.

  • Adds a new formatter() method with 9 test files ranging from small (2.46KB) to extra large (346KB) covering JSX, TS, TSX, and JS files
  • Updates the formatter benchmark to use the new dedicated formatter() fixtures instead of minimal()
  • Refactors complicated() method to inline the URL array, improving code consistency

Reviewed Changes

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

File Description
tasks/common/src/test_file.rs Removes unused react() method, adds new formatter() method with diverse test files, and refactors complicated() for consistency
tasks/benchmark/benches/formatter.rs Updates formatter benchmark to use TestFiles::formatter() instead of minimal()

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

@codspeed-hq
Copy link

codspeed-hq bot commented Nov 13, 2025

CodSpeed Performance Report

Merging #15658 will not alter performance

Comparing 11-13-ci_benchmarks_update_formatter_fixtures (9a9eba7) with main (ba76081)1

Summary

✅ 34 untouched
🆕 8 new
⏩ 3 skipped2

Benchmarks breakdown

Mode Benchmark BASE HEAD Change
🆕 Simulation formatter[App.tsx] N/A 56.6 ms N/A
🆕 Simulation formatter[Search.tsx] N/A 2.1 ms N/A
🆕 Simulation formatter[core.js] N/A 2.4 ms N/A
🆕 Simulation formatter[errors.ts] N/A 850.2 µs N/A
🆕 Simulation formatter[handle-comments.js] N/A 3.9 ms N/A
🆕 Simulation formatter[index.tsx] N/A 5.2 ms N/A
🆕 Simulation formatter[next.ts] N/A 3.2 ms N/A
🆕 Simulation formatter[types.ts] N/A 15 ms N/A

Footnotes

  1. No successful run was found on main (7b29f21) during the generation of this report, so ba76081 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

  2. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@leaysgur leaysgur force-pushed the 11-13-ci_benchmarks_update_formatter_fixtures branch 2 times, most recently from 677d4a5 to 9a9eba7 Compare November 13, 2025 03:16
@leaysgur leaysgur requested a review from Dunqing November 13, 2025 03:31
@Dunqing
Copy link
Member

Dunqing commented Nov 13, 2025

I am fine with changing benchmark files, but adding more formatter benchmark files will cause CI to be a bit slow. What do you think? @Boshen

@leaysgur leaysgur requested a review from Boshen November 13, 2025 23:35
@leaysgur
Copy link
Member Author

I'll merge it for now.

After that, I'll compare the execution times with the original benchmark.
If it's clearly slower, I'll start deleting files that produce similar results.

@leaysgur leaysgur added the 0-merge Merge with Graphite Merge Queue label Nov 18, 2025
Copy link
Member Author

leaysgur commented Nov 18, 2025

Merge activity

Fixes #15628

- Remove unused `TestFiles::react()`
- Refactor private function to be inlined
- Add formatter fixtures
- Expand timeout 5 > 10s
@graphite-app graphite-app bot force-pushed the 11-13-ci_benchmarks_update_formatter_fixtures branch from 9a9eba7 to e615162 Compare November 18, 2025 01:31
@graphite-app graphite-app bot merged commit e615162 into main Nov 18, 2025
20 checks passed
@graphite-app graphite-app bot deleted the 11-13-ci_benchmarks_update_formatter_fixtures branch November 18, 2025 01:36
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Nov 18, 2025
@leaysgur
Copy link
Member Author

NOTE: Since stopped downloading huge files, it actually feels a bit faster...

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.

tasks/common: Find and use more real-world sources for formatter benchmark

3 participants