Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

File Open Performance Tests #841

Merged
merged 15 commits into from
May 11, 2012
Merged

File Open Performance Tests #841

merged 15 commits into from
May 11, 2012

Conversation

tvoliter
Copy link
Contributor

@tvoliter tvoliter commented May 8, 2012

  • Added instrumentation to functions relating to file open
  • Added Performance-tests.js Jasmine spec so perf tests can run in automation. Spec is currently disabled and not part of the unit test suite. Dev must manually enable it when doing perf testing.
  • perf test files are NOT part of repo since they are real world files. Files live in brackets-scenario
  • Added enabled/disabled state to PerfUtils
  • Made markStart() in PerfUtils return the timer name so it doesn't have to be created twice by clients
  • Added getDelimitedPerfData() to perfUtils and added area text in performance results Window with data to allow devs to easily store performance data.

@jasonsanjose
Copy link
Member

reviewing

@@ -62,7 +62,8 @@ define(function (require, exports, module) {
function _handleShowPerfData() {
var $perfHeader = $("<div class='modal-header' />")
.append("<a href='#' class='close'>&times;</a>")
.append("<h1 class='dialog-title'>Performance Data</h1>");
.append("<h1 class='dialog-title'>Performance Data</h1>")
.append("<div align=right>Raw data (copy paste out): <textarea rows=1 style='width:30px; height:8px; overflow: hidden; resize: none' id='brackets-perf-raw-data'>" + PerfUtils.getDelimitedPerfData() + "</textarea></div>");
Copy link
Member

Choose a reason for hiding this comment

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

I feel like I've seen ways to copy text from a web page, but all my googling results in a Flash-based solution.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought of that too and I found a number of ways to do it on stack overflow, but it wasn't simple so I went for the current solution since it's stop gap until we have performance reporting

Copy link
Member

Choose a reason for hiding this comment

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

Um, so I just tried the feature and I can't do CMD+A to select all. I have to drag a selection and CMD+C to copy out of the textarea. Is there anything better we can do?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I forgot that does not work on Mac but it does on PC. Let me try something else...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I fixed this by selecting all the text by a click handler on the field.

Ty

-----Original Message-----
From: Jason San Jose [mailto:reply@reply.github.com]
Sent: Thursday, May 10, 2012 11:14 AM
To: Ty Voliter
Subject: Re: [brackets] File Open Performance Tests (#841)

@@ -62,7 +62,8 @@ define(function (require, exports, module) {
function _handleShowPerfData() {
var $perfHeader = $("

")
.append("×")

  •        .append("<h1 class='dialog-title'>Performance Data</h1>");
    
  •        .append("<h1 class='dialog-title'>Performance Data</h1>")
    
  •        .append("<div align=right>Raw data (copy paste out): <textarea rows=1 style='width:30px; height:8px; overflow: hidden; resize: none' id='brackets-perf-raw-data'>" + PerfUtils.getDelimitedPerfData() + "</textarea></div>");
    

Um, so I just tried the feature and I can't do CMD+A to select all. I have to drag a selection and CMD+C to copy out of the textarea. Is there anything better we can do?


Reply to this email directly or view it on GitHub:
https://github.com/adobe/brackets/pull/841/files#r803784

@ghost ghost assigned jasonsanjose May 9, 2012

describe("Performance Tests", function () {

var testPath = SpecRunnerUtils.getTestPath("/../../../brackets-scenario/OpenFileTest/"),
Copy link
Member

Choose a reason for hiding this comment

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

The assumption for the repo location should be documented. Perhaps we can stuff this in a config file later. New issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Commented added. Ultimately I think we want test media that we can make public so that anyone can run the tests. I commented about this too

@jasonsanjose
Copy link
Member

Initial review complete

@jasonsanjose
Copy link
Member

need to merge with master

@jasonsanjose
Copy link
Member

Second pass complete. Since this is off by default, and we don't have an automation task for this story, I think this is fine as-is with TODOs indicated.

@tvoliter
Copy link
Contributor Author

Cool. Fixes submitted!

Ty

-----Original Message-----
From: Jason San Jose [mailto:reply@reply.github.com]
Sent: Thursday, May 10, 2012 11:19 AM
To: Ty Voliter
Subject: Re: [brackets] File Open Performance Tests (#841)

Second pass complete. Since this is off by default, and we don't have an automation task for this story, I think this is fine as-is with TODOs indicated.


Reply to this email directly or view it on GitHub:
#841 (comment)

@@ -87,6 +89,8 @@ define(function (require, exports, module) {
}

$(exports).triggerHandler("documentSelectionFocusChange");

PerfUtils.addMeasurement(perfTimerName);
Copy link
Member

Choose a reason for hiding this comment

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

jslint error. perfTimerName was used before it was defined.

…perf

* origin/master: (110 commits)
  Add comment.
  Make sure cursor is visible after a change event is received.
  code review changes
  Add a title to the project title in the sidebar
  refactor perfutils to allow measurement to be updated. update TypingSpeedLogger to use new perfutils api.
  fix comment for _setWidth
  Cleanup sidebar resizer. Fix edge case when moving from snapped closed to open.
  Update CodeMirror SHA
  Update README.md
  fix merge issues
  Don't resize shadow when using absolute positioning.
  Fix scroller shadow resize
  Increase sidebar resizer width. Fix dblclick bugs.
  convert markStart to also accept an array
  Use updated hyphenated names
  Code review comments. Fixes selection marker when closing jstree nodes
  convert multiple value output to min/avg/max/last
  Update CodeMirror SHA
  Call ProjectManager.loadProject() after extensions have been loaded.
  fixed the dumb ol issue that I thought I fixed before with the indent.  @tvoltier found it with his hawk eyes.
  ...

Conflicts:
	src/editor/EditorManager.js
	src/utils/PerfUtils.js
@@ -64,6 +64,7 @@ define(function (require, exports, module) {
var EditorManager = require("editor/EditorManager"),
Commands = require("command/Commands"),
CommandManager = require("command/CommandManager"),
PerfUtils = require("utils/PerfUtils"),
Copy link
Member

Choose a reason for hiding this comment

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

Indent of assignment

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed and pushed

-----Original Message-----
From: Jason San Jose [mailto:reply@reply.github.com]
Sent: Friday, May 11, 2012 12:42 PM
To: Ty Voliter
Subject: Re: [brackets] File Open Performance Tests (#841)

@@ -64,6 +64,7 @@ define(function (require, exports, module) {
var EditorManager = require("editor/EditorManager"),
Commands = require("command/Commands"),
CommandManager = require("command/CommandManager"),

  •    PerfUtils           = require("utils/PerfUtils"),
    

Indent of assignment


Reply to this email directly or view it on GitHub:
https://github.com/adobe/brackets/pull/841/files#r810596

jasonsanjose added a commit that referenced this pull request May 11, 2012
@jasonsanjose jasonsanjose merged commit c4ff795 into master May 11, 2012
Th30 referenced this pull request in Th30/brackets Feb 8, 2017
…nd menu font fixed to match filetree, fix 2
Th30 referenced this pull request in Th30/brackets Feb 10, 2017
Th30 referenced this pull request in Th30/brackets Feb 10, 2017
gideonthomas pushed a commit to gideonthomas/brackets that referenced this pull request Aug 31, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants