| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * Different data types that each require their own labelled axis. | 6 * Different data types that each require their own labelled axis. |
| 7 */ | 7 */ |
| 8 var TimelineDataType = { | 8 var TimelineDataType = {SOURCE_COUNT: 0, BYTES_PER_SECOND: 1}; |
| 9 SOURCE_COUNT: 0, | |
| 10 BYTES_PER_SECOND: 1 | |
| 11 }; | |
| 12 | 9 |
| 13 /** | 10 /** |
| 14 * A TimelineDataSeries collects an ordered series of (time, value) pairs, | 11 * A TimelineDataSeries collects an ordered series of (time, value) pairs, |
| 15 * and converts them to graph points. It also keeps track of its color and | 12 * and converts them to graph points. It also keeps track of its color and |
| 16 * current visibility state. DataSeries are solely responsible for tracking | 13 * current visibility state. DataSeries are solely responsible for tracking |
| 17 * data, and do not send notifications on state changes. | 14 * data, and do not send notifications on state changes. |
| 18 * | 15 * |
| 19 * Abstract class, doesn't implement onReceivedLogEntry. | 16 * Abstract class, doesn't implement onReceivedLogEntry. |
| 20 */ | 17 */ |
| 21 var TimelineDataSeries = (function() { | 18 var TimelineDataSeries = (function() { |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 } | 356 } |
| 360 // The disk cache has a lot of 0-length writes, when truncating entries. | 357 // The disk cache has a lot of 0-length writes, when truncating entries. |
| 361 // Ignore those. | 358 // Ignore those. |
| 362 if (entry.params.bytes_copied != 0) | 359 if (entry.params.bytes_copied != 0) |
| 363 this.addPoint(entry.time, entry.params.bytes_copied); | 360 this.addPoint(entry.time, entry.params.bytes_copied); |
| 364 } | 361 } |
| 365 }; | 362 }; |
| 366 | 363 |
| 367 return DiskCacheTransferRateDataSeries; | 364 return DiskCacheTransferRateDataSeries; |
| 368 })(); | 365 })(); |
| OLD | NEW |