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

Health Data Logs for 1.4 #11311

Merged
merged 8 commits into from
Jul 11, 2015
Merged

Health Data Logs for 1.4 #11311

merged 8 commits into from
Jul 11, 2015

Conversation

abose
Copy link
Contributor

@abose abose commented Jun 25, 2015

Add performance-specific metrics to the Health Data Report. Things we want to start tracking:

  • Startup Time
  • Average File Switching Time
  • Project Size (number of files)
  • Type of file(s) opened in Brackets

tracks #11055

…kets.

We aonly log the stantard extensions known by brackets[js,html, css, etc..]. All other extensions are ignored.
App start, module deps resolved, load proj, open file
@abose abose added this to the Release 1.4 milestone Jun 25, 2015
@abose
Copy link
Contributor Author

abose commented Jun 25, 2015

@prafulVaishnav @prksingh Can we track the project size using the background file indexing work going on?

@nethip
Copy link
Contributor

nethip commented Jun 26, 2015

@abose Travis is failing at the jshint step. Could you fix the jshint error and update this PR?

@abose
Copy link
Contributor Author

abose commented Jun 26, 2015

@nethip Fixed.

…n/avg/max/sd.

Also adding generic API to log health data given a hey
@abose
Copy link
Contributor Author

abose commented Jun 30, 2015

@marcelgerber @sprintr could you check this out.

@@ -144,6 +146,9 @@ define(function (require, exports, module) {

sendHealthDataToServer()
.done(function () {
//We have already sent the health data, so can clear ll health data
//Logged till now
Copy link
Contributor

Choose a reason for hiding this comment

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

A space after // would be nice here and ll in clear ll health seems to be a typo.

@abose
Copy link
Contributor Author

abose commented Jul 1, 2015

Thanks @sprintr for reviewing this. I have made the changes.

@@ -528,6 +530,7 @@ define(function (require, exports, module) {
return handleFileOpen(commandData).done(function (file) {
var paneId = (commandData && commandData.paneId) || MainViewManager.ACTIVE_PANE;
MainViewManager.addToWorkingSet(paneId, file, commandData.index, commandData.forceRedraw);
HealthLogger.fileOpened(file.fullPath, true);
Copy link
Contributor

Choose a reason for hiding this comment

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

This way, we call fileOpened two times (one time for handleFileOpen, then for handleFileAddToWorkingSetAndOpen). Is it meant to be like this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it is meant to track twice, one log tracks all files opened to working set, and another the total of all files opened.

if (!shouldLogHealthData()) {
return;
}
var fileExtension = FileUtils.getFileExtension(filePath),
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if it makes sense to also log multiple file extensions, like in .min.js and .min.css (which are definitely the most common).
It'd be an interesting metric to see how many of the opened files are minified.

@marcelgerber
Copy link
Contributor

I've just committed a new approach to getValueAsString which I like more. Please let me know whether you like it.

}
};

/**
* Returns the performance data as a tab deliminted string
Copy link
Contributor

Choose a reason for hiding this comment

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

Not your fault, but a typo anyways: deliminted

@abose
Copy link
Contributor Author

abose commented Jul 11, 2015

@marcelgerber liked your implementation, but _.sum doesn't seem to be undefined, so I reverted back to the earlier implementation for getValueAsString.

@abose
Copy link
Contributor Author

abose commented Jul 11, 2015

The project size will be tracked by the new find in files update. As this is now blocking other health logs for 1.4, I am going ahead and merging this PR.

abose added a commit that referenced this pull request Jul 11, 2015
@abose abose merged commit 389d9e6 into master Jul 11, 2015
@abose abose deleted the abose/HealthLogs1.4 branch July 11, 2015 06:27
@abose abose restored the abose/HealthLogs1.4 branch July 11, 2015 06:28
@marcelgerber marcelgerber deleted the abose/HealthLogs1.4 branch July 12, 2015 14:29
openedFileExt : {},
workingSetFileExt : {}
};
if (language.getId() !== "unknown") {
Copy link
Member

Choose a reason for hiding this comment

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

Belated, but: is there a reason we don't want to log unrecognized file extensions too? Seems like it'd be a useful way of identifying gaps in our default set of syntax highlighters & file-extension mappings...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

File names and extensions I think are personal information. So it felt like one step short of sending all filenames opened in brackets to the servers- which makes even me paranoid. 😖

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.

5 participants