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

Side by Side Diff: chrome/browser/resources/task_manager/measuretime.js

Issue 8993007: WebUI TaskManager: Delay scripts loading. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review fix Created 9 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 /**
6 * @fileoverview Utility methods for measuring loading times.
7 *
8 * To be included as a first script in main.html
9 */
10
11 var measuretime = {};
12
13 measuretime.isShowTime = localStorage.isShowTime;
mazda 2011/12/21 05:56:53 localStorage.measureTimeEnabled may be better?
yoshiki 2011/12/21 06:08:48 Done.
14
15 measuretime.startInterval = function(name) {
16 if (this.isShowTime)
17 console.time(name);
18 };
19
20 measuretime.recordInterval = function(name) {
21 if (this.isShowTime)
22 console.timeEnd(name);
23 };
24
25 measuretime.startInterval('Load.Total');
26 measuretime.startInterval('Load.Script');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698