Skip to content

Drop function transform#693

Merged
gregtatum merged 1 commit into
firefox-devtools:masterfrom
gregtatum:drop-function
Jan 5, 2018
Merged

Drop function transform#693
gregtatum merged 1 commit into
firefox-devtools:masterfrom
gregtatum:drop-function

Conversation

@gregtatum
Copy link
Copy Markdown
Member

@gregtatum gregtatum commented Jan 3, 2018

                 A:4,0                              A:1,0
                 /    \        Drop Func C            |
                v      v           -->                v
            B:3,0     C:1,0                         B:1,0
           /      \                                   |
          v        v                                  v
        C:2,1     D:1,1                             D:1,1
        |
        v
      D:1,1

Resolves #220

This came out of discussions in #435.

This adds the ability to remove samples from the call tree. I called it "Drop functions".

Here I dropped idling from the compositor thread:
image

Here is the icon I created for "drop":
image

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 3, 2018

Codecov Report

Merging #693 into master will increase coverage by 0.12%.
The diff coverage is 79.41%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #693      +/-   ##
==========================================
+ Coverage   62.31%   62.44%   +0.12%     
==========================================
  Files         118      118              
  Lines        7046     7064      +18     
  Branches     1590     1596       +6     
==========================================
+ Hits         4391     4411      +20     
+ Misses       2335     2333       -2     
  Partials      320      320
Impacted Files Coverage Δ
.../components/calltree/ProfileCallTreeContextMenu.js 0% <0%> (ø) ⬆️
src/reducers/profile-view.js 83.94% <100%> (+0.66%) ⬆️
src/profile-logic/transforms.js 86.94% <89.28%> (+0.45%) ⬆️

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 92f4541...74964d7. Read the comment docs.

Comment thread src/profile-logic/transforms.js Outdated
const { stackTable, frameTable, samples } = thread;

// Go through each stack, and label it as containing the function or not.
const stackContainsFunc = new Set();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I wonder if an array of booleans would be faster here. Would require less hashing.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Ah good point, I'll make that change.

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.

2 participants