Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(202)

Unified Diff: chrome/browser/resources/file_manager/js/main.js

Issue 8490014: [filebrowser] Historgram for the file browser's open time. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Added comments Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/file_manager/js/main.js
diff --git a/chrome/browser/resources/file_manager/js/main.js b/chrome/browser/resources/file_manager/js/main.js
index dffad2ae6facc1ccf64916d8931fdd55069918d7..3e0f1bfb8f6e864c72dc72323b5e88d44c961add 100644
--- a/chrome/browser/resources/file_manager/js/main.js
+++ b/chrome/browser/resources/file_manager/js/main.js
@@ -16,8 +16,12 @@ function init() {
var rootPaths = ['Downloads', 'removable', 'archive', 'tmp'];
function onEntriesFound(filesystem, entries) {
+ metrics.recordTime('EnumerateRoots');
FileManager.initStrings(function () {
+ metrics.startInterval('Construct');
fileManager = new FileManager(document.body, filesystem, entries);
+ metrics.recordTime('Construct');
+ metrics.recordTime('TotalLoad');
// We're ready to run. Tests can monitor for this state with
// ExtensionTestMessageListener listener("ready");
// ASSERT_TRUE(listener.WaitUntilSatisfied());
@@ -26,6 +30,7 @@ function init() {
}
function onFileSystemFound(filesystem) {
+ metrics.recordTime('RequestLocalFileSystem');
console.log('Found filesystem: ' + filesystem.name, filesystem);
var entries = [];
@@ -42,6 +47,7 @@ function init() {
}
}
+ metrics.startInterval('EnumerateRoots');
if (filesystem.name.match(/^chrome-extension_\S+:external/i)) {
// We've been handed the local filesystem, whose root directory
// cannot be enumerated.
@@ -54,6 +60,7 @@ function init() {
util.installFileErrorToString();
- console.log('Requesting filesystem.');
- chrome.fileBrowserPrivate.requestLocalFileSystem(onFileSystemFound);
+ console.log('Requesting filesystem.');
+ metrics.startInterval('RequestLocalFileSystem');
+ chrome.fileBrowserPrivate.requestLocalFileSystem(onFileSystemFound);
}
« no previous file with comments | « chrome/browser/resources/file_manager/js/file_manager.js ('k') | chrome/browser/resources/file_manager/js/metrics.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698