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)

x86
macOS
defect

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 25

People

(Reporter: anton, Assigned: anton)

References

Details

Attachments

(1 file, 4 obsolete files)

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.
Depends on: 828038
Assignee: nobody → anton
Status: NEW → ASSIGNED
Attachment #768719 - Attachment is obsolete: true
Attached patch UI to save/load profiles (obsolete) — Splinter Review
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)
OK, try is green.
looks good. This is next on my review list.
Attached patch UI to save/load profiles (obsolete) — Splinter Review
Rebased the patch.
Attachment #773729 - Attachment is obsolete: true
Attachment #773729 - Flags: review?(rcampbell)
Attachment #775919 - Flags: review?(rcampbell)
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+
Fixed nits. Carrying over r+.
Attachment #775919 - Attachment is obsolete: true
Attachment #776758 - Flags: review+
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 25
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: