Closed
Bug 1117825
Opened 9 years ago
Closed 9 years ago
Create an utility function for the FlameGraph widget to convert the profiler data into something drawable
Categories
(DevTools :: Performance Tools (Profiler/Timeline), defect)
DevTools
Performance Tools (Profiler/Timeline)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 37
People
(Reporter: vporof, Assigned: vporof)
References
Details
Attachments
(1 file)
8.79 KB,
patch
|
jsantell
:
review+
BenWa
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Updated•9 years ago
|
Blocks: perf-tool-v2
Depends on: 1077444
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → vporof
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•9 years ago
|
||
Attachment #8544059 -
Flags: review?(jsantell)
Comment 2•9 years ago
|
||
Comment on attachment 8544059 [details] [diff] [review] v1 Review of attachment 8544059 [details] [diff] [review]: ----------------------------------------------------------------- r+ ::: browser/devtools/shared/test/browser_flame-graph-utils.js @@ +4,5 @@ > +// Tests that text metrics in the flame graph widget work properly. > + > +let {FlameGraphUtils} = Cu.import("resource:///modules/devtools/FlameGraph.jsm", {}); > + > +let test = Task.async(function*() { Should use `add_task(function*(){})`
Attachment #8544059 -
Flags: review?(jsantell) → review+
Assignee | ||
Comment 3•9 years ago
|
||
Comment on attachment 8544059 [details] [diff] [review] v1 Also this.
Attachment #8544059 -
Flags: review?(bgirard)
Comment 4•9 years ago
|
||
Comment on attachment 8544059 [details] [diff] [review] v1 Review of attachment 8544059 [details] [diff] [review]: ----------------------------------------------------------------- ::: browser/devtools/shared/widgets/FlameGraph.jsm @@ +738,5 @@ > > +const FLAME_GRAPH_BLOCK_HEIGHT = 12; > + > +const PALLETTE_SIZE = 10; > +const PALLETTE_HUE_OFFSET = Math.random() * 90; Are you sure you want Math.random()? I see no benefit of not being consistent here. @@ +839,5 @@ > + * > + * @param string src > + * @return number > + */ > + _getStringSalt: function(src) { salt != hash Not that a hash collision would be bad at all here it's easy to get a significantly better hash function. Instead of summing, multiply by a prime number. This will make it avoid simple, accidental and non malicious, collision from occurring for similar words: http://stackoverflow.com/a/2624210 Again, not critical here but it's simple and a good habit.
Attachment #8544059 -
Flags: review?(bgirard) → review+
Assignee | ||
Comment 5•9 years ago
|
||
(In reply to Benoit Girard (:BenWa) from comment #4) > > Not that a hash collision would be bad at all here it's easy to get a > significantly better hash function. Instead of summing, multiply by a prime > number. This will make it avoid simple, accidental and non malicious, > collision from occurring for similar words: > http://stackoverflow.com/a/2624210 > > Again, not critical here but it's simple and a good habit. Good idea.
Assignee | ||
Comment 6•9 years ago
|
||
Addressed comments and landed: https://hg.mozilla.org/integration/fx-team/rev/db5eef36bcd9
Whiteboard: [fixed-in-fx-team]
Backed out for dt2 orange: https://treeherder.mozilla.org/logviewer.html#?job_id=1645879&repo=fx-team https://hg.mozilla.org/integration/fx-team/rev/ba0cafaf462d
Assignee | ||
Comment 8•9 years ago
|
||
Trying again: https://hg.mozilla.org/integration/fx-team/rev/f919a460dc30
Comment 9•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/f919a460dc30
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 37
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•