OLD | NEW |
---|---|
(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.startInterval = function(name) { | |
14 if (localStorage.isShowTime) | |
arv (Not doing code reviews)
2011/12/20 19:33:57
Does this change? Accessing stuff on localStorage
yoshiki
2011/12/21 05:18:57
Done. The value is stored at the time of initializ
| |
15 console.time(name); | |
16 }; | |
17 | |
18 measuretime.recordInterval = function(name) { | |
19 if (localStorage.isShowTime) | |
20 console.timeEnd(name); | |
21 }; | |
22 | |
23 measuretime.startInterval('Load.Total'); | |
24 measuretime.startInterval('Load.Script'); | |
OLD | NEW |