Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change page information structure to match the gecko side #2266

Merged
merged 4 commits into from Oct 9, 2019

Conversation

canova
Copy link
Member

@canova canova commented Oct 4, 2019

It changes the the page structure of page information array. And adds two upgraders for gecko/processed profiles. Currently we don't do any special handling for single tab browsing yet.

Gecko sides of this patch haven't landed yet, we should first land this side and then we can land the gecko side.
Gecko bugs:
https://bugzilla.mozilla.org/show_bug.cgi?id=1583271
https://bugzilla.mozilla.org/show_bug.cgi?id=1512500

(I will put some profiles here to test with deploy preview)

@codecov
Copy link

codecov bot commented Oct 5, 2019

Codecov Report

Merging #2266 into master will increase coverage by 0.04%.
The diff coverage is 97.56%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2266      +/-   ##
==========================================
+ Coverage   86.06%   86.11%   +0.04%     
==========================================
  Files         203      203              
  Lines       14755    14819      +64     
  Branches     3704     3711       +7     
==========================================
+ Hits        12699    12761      +62     
- Misses       1884     1886       +2     
  Partials      172      172
Impacted Files Coverage Δ
src/test/fixtures/profiles/gecko-profile.js 100% <ø> (ø) ⬆️
src/app-logic/constants.js 100% <100%> (ø) ⬆️
src/components/tooltip/Marker.js 85.78% <100%> (-0.14%) ⬇️
src/components/timeline/VerticalIndicators.js 100% <100%> (ø) ⬆️
src/test/fixtures/profiles/processed-profile.js 97.92% <100%> (ø) ⬆️
src/profile-logic/processed-profile-versioning.js 93.69% <96.96%> (+0.24%) ⬆️
src/profile-logic/gecko-profile-versioning.js 92.73% <97.43%> (+0.6%) ⬆️
src/selectors/publish.js 81.33% <0%> (-0.72%) ⬇️
src/components/timeline/TrackContextMenu.js 89.14% <0%> (-0.13%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3deeb4d...8fd430e. Read the comment docs.

Copy link
Member

@gregtatum gregtatum left a comment

Choose a reason for hiding this comment

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

Looks pretty good to me! Can you add a test that exercises the upgrade before landing? I think that's the only thing I see missing. I think you can modify the stored profile fixtures, and a profile snapshot update should be sufficient. It would be good to add the commit first with the new data, then a second commit with the new changes and snapshot change.

@@ -413,8 +413,7 @@ export type DOMEventMarkerPayload = {|
interval: 'start' | 'end',
eventType: string,
phase: 0 | 1 | 2 | 3,
docShellId?: string,
docshellHistoryId?: number,
innerWindowID?: number,
Copy link
Member

Choose a reason for hiding this comment

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

Do we have a good place to document this? I'm guessing it'll be repeated across multiple payloads.

Copy link
Member

@gregtatum gregtatum Oct 7, 2019

Choose a reason for hiding this comment

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

It's probably good enough to just grep and find the Page type.

Copy link
Member Author

Choose a reason for hiding this comment

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

Document in gecko side? We have that information in base payload class in gecko: https://searchfox.org/mozilla-central/rev/5cb522c7baba24e55874809e0e206b001494c1e9/tools/profiler/public/ProfilerMarkerPayload.h#144-145 but it's optional and we only pass that info in subset of markers (because we are not able to find that info on others)

src/profile-logic/gecko-profile-versioning.js Show resolved Hide resolved
src/types/markers.js Show resolved Hide resolved
@canova canova force-pushed the new-page-info-structure branch 2 times, most recently from 741d665 to c1c7b3b Compare October 8, 2019 15:38
@@ -162,6 +163,13 @@ describe('upgrading processed profiles', function() {
require('../fixtures/upgrades/processed-2.json')
);
});
it('should upgrade processed-3.json all the way to the current version', async function() {
Copy link
Member Author

Choose a reason for hiding this comment

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

I had to add a new test json here because processed-2.json was too old and upgrader 8 is removing the docshell ids and docshell history ids from network marker :/ (page information is added after upgrader 8)

@canova
Copy link
Member Author

canova commented Oct 8, 2019

@gregtatum It's ready for a review again. Changed the json files to test this upgrader. Second commit is the same commit that you reviewed. Added the old page information to the first commit and on the last commit updated the snapshots.

Copy link
Member

@gregtatum gregtatum left a comment

Choose a reason for hiding this comment

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

Thanks for the test! It looks good to me.

@canova canova merged commit bb0caf0 into firefox-devtools:master Oct 9, 2019
@canova canova deleted the new-page-info-structure branch October 9, 2019 16:06
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.

None yet

2 participants