Closed
Bug 828046
Opened 13 years ago
Closed 13 years ago
Save/load profiles to/from disk
Categories
(DevTools :: Performance Tools (Profiler/Timeline), defect, P3)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 25
People
(Reporter: anton, Assigned: anton)
References
Details
Attachments
(1 file, 4 obsolete files)
|
27.84 KB,
patch
|
anton
:
review+
|
Details | Diff | Splinter Review |
It's nice to be able to save your profiles for later. For example, you can profile your app, save the data, optimize the code, then load your data and compare with the new state.
| Assignee | ||
Comment 1•13 years ago
|
||
Assignee: nobody → anton
Status: NEW → ASSIGNED
| Assignee | ||
Comment 2•13 years ago
|
||
Attachment #768719 -
Attachment is obsolete: true
| Assignee | ||
Comment 3•13 years ago
|
||
I really tried to use sdk/io/fs module but addon SDK has two blocker bugs in the Buffer implementation (will file a bug for that) so I decided not to wait.
Try: https://tbpl.mozilla.org/?tree=Try&rev=858616fd15b5
Attachment #768732 -
Attachment is obsolete: true
Attachment #773729 -
Flags: review?(rcampbell)
| Assignee | ||
Comment 4•13 years ago
|
||
OK, try is green.
Comment 5•13 years ago
|
||
looks good. This is next on my review list.
| Assignee | ||
Comment 6•13 years ago
|
||
Rebased the patch.
Attachment #773729 -
Attachment is obsolete: true
Attachment #773729 -
Flags: review?(rcampbell)
Attachment #775919 -
Flags: review?(rcampbell)
Comment 7•13 years ago
|
||
Comment on attachment 775919 [details] [diff] [review]
UI to save/load profiles
Review of attachment 775919 [details] [diff] [review]:
-----------------------------------------------------------------
ok, just a few nits about comments, otherwise it's good.
Looks good and plays nice. I didn't test with importing more than one saved profile though.
::: browser/devtools/profiler/panel.js
@@ +260,5 @@
>
> return profile;
> },
>
> + importProfile: function (name, data, opts={}) {
wat? no doc comment??
@@ +480,5 @@
> panelWin.DebuggerView.Sources.preferredSource = data.uri;
> }.bind(this));
> },
>
> + openFileDialog: function (opts={}) {
no doc comment?
@@ +503,5 @@
> +
> + return deferred.promise;
> + },
> +
> + saveProfile: function (file, data) {
no doc comment. :(
@@ +516,5 @@
> + let deferred = promise.defer();
> + let ch = NetUtil.newChannel(file);
> + ch.contentType = "application/json";
> +
> + NetUtil.asyncFetch(ch, (input, status) => {
surprised to see NetUtil here and not OS.File.read(). Not a bad thing though.
::: browser/devtools/profiler/sidebar.js
@@ +36,5 @@
> }
>
> Sidebar.prototype = Heritage.extend(WidgetMethods, {
> + /**
> + *
nit: extra empty line.
Attachment #775919 -
Flags: review?(rcampbell) → review+
| Assignee | ||
Comment 8•13 years ago
|
||
Fixed nits. Carrying over r+.
Attachment #775919 -
Attachment is obsolete: true
Attachment #776758 -
Flags: review+
| Assignee | ||
Comment 9•13 years ago
|
||
Whiteboard: [fixed-in-fx-team]
Comment 10•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 25
Updated•8 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•