Skip to content

Bug 2032537: show count of the improvements and regressions in the subtests per platform #1029

Merged
kala-moz merged 11 commits intomozilla:mainfrom
kala-moz:show-subtest-regr-impr
May 4, 2026
Merged

Bug 2032537: show count of the improvements and regressions in the subtests per platform #1029
kala-moz merged 11 commits intomozilla:mainfrom
kala-moz:show-subtest-regr-impr

Conversation

@kala-moz
Copy link
Copy Markdown
Contributor

@kala-moz kala-moz commented Apr 17, 2026

Solution for Bug 2032537
JIRA

Updated:

In this PR, I created a custom hook called useSubtestRegressionCount to find, for a given test block, every row that has subtests; fetch those subtests from the treeherderAPI; and return the counts of regressions and improvements for each platform. In treeherder.ts, added memoized fetches for the subtests to improve performance and avoid unnecessary refetching. RevisionRow supplies the hook with the props to display the number of regressions and improvements for the subtests present in each row of the block.

Note: need to add test coverage next. So in progress.

Deploy link

Screenshot 2026-04-22 at 6 23 53 PM

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 17, 2026

Deploy Preview for mozilla-perfcompare ready!

Name Link
🔨 Latest commit c8e11cd
🔍 Latest deploy log https://app.netlify.com/projects/mozilla-perfcompare/deploys/69f3e7479c74580008fd4780
😎 Deploy Preview https://deploy-preview-1029--mozilla-perfcompare.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.32%. Comparing base (25f6c1c) to head (c8e11cd).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1029      +/-   ##
==========================================
+ Coverage   96.22%   96.32%   +0.10%     
==========================================
  Files         112      113       +1     
  Lines        3175     3262      +87     
  Branches      715      739      +24     
==========================================
+ Hits         3055     3142      +87     
  Misses        118      118              
  Partials        2        2              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mgaudet
Copy link
Copy Markdown
Contributor

mgaudet commented Apr 17, 2026

  1. I like the general thrust here.
  2. I tried with this link; I found it took quite a long time for the SP3 results to show up
  3. I do wonder about grouping all the platforms together a bit; did you try per-platform improve/regress boxes and found it too noisy?

@kala-moz
Copy link
Copy Markdown
Contributor Author

kala-moz commented Apr 17, 2026

  1. I like the general thrust here.

    1. I tried with this link; I found it took quite a long time for the SP3 results to show up

    2. I do wonder about grouping all the platforms together a bit; did you try per-platform improve/regress boxes and found it too noisy?

@mgaudet I'm glad you brought up #3 because I wasn't too sure if it was per platform or all the platforms together. I can update it to go by platform and see how it looks. Hmm, I'll look over #2.

@kala-moz kala-moz changed the title Bug 2032537: show count of the improvements and regressions in the subtests at the top-level row Bug 2032537: show count of the improvements and regressions in the subtests per platform Apr 20, 2026
Copy link
Copy Markdown
Contributor

@gmierz gmierz left a comment

Choose a reason for hiding this comment

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

Great change! Some things I noticed as I was testing:
(1) It looks like the spacing between the rows on the result page are larger. Is this expected?
(2) Looking at the network tab, when I am loading the page with MWU on the results page, I see the subtest results being fetched twice: once when we're fetching the main results, and then a second time once the main results are obtained. Seems like a bug in the implementation somewhere and will need to be fixed.
(3) Sometimes it's unclear which row the tags that show the regressions/improvements are associated with (is it the row above it or below it). Is there something we can do to make it clearer that it's the row below them?

I think that if we're starting to fetch the subtest results in the background, we should get a bug filed to use those results in the subtest page too instead of doing another request for the same data when we navigate to the subtests.

@kala-moz
Copy link
Copy Markdown
Contributor Author

kala-moz commented Apr 22, 2026

@gmierz Thanks for your feedback!

1.) and 3.) The extra spacing is because of the regressions and improvement pills' placements. I've moved them inside the revision row so it's clearer which pills belongs to which row and to preserve the original spacing of the rows.

Screenshot 2026-04-22 at 6 23 53 PM

2.) I'm not seeing the subtests call for the main results fetch? We shouldn't be fetching the subtests when the main results are being fetched. The only subtests calls I see are for the rows with unique subtests that I'm fetching to count the improvements and regressions. Since that's a lot of unique calls, I could batch them into one request? Also could you please show me exactly where you see the subtests fetch for the main results call, maybe with screenshots?

Screenshot 2026-04-22 at 3 37 06 PM

@kala-moz kala-moz requested a review from gmierz April 22, 2026 22:59
@kala-moz kala-moz force-pushed the show-subtest-regr-impr branch from b3e3cf3 to a8ed45a Compare April 30, 2026 18:08
Copy link
Copy Markdown
Contributor

@gmierz gmierz left a comment

Choose a reason for hiding this comment

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

r+ great work! The fix you made also seemed to make the caching work when switching the test versions too. :)

@kala-moz kala-moz merged commit ec289b8 into mozilla:main May 4, 2026
10 checks passed
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