| Index: tracing/tracing/metrics/value_list.html
|
| diff --git a/tracing/tracing/metrics/value_list.html b/tracing/tracing/metrics/value_list.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..1744b624bf3d156634b8af8ef32729b527415417
|
| --- /dev/null
|
| +++ b/tracing/tracing/metrics/value_list.html
|
| @@ -0,0 +1,41 @@
|
| +<!DOCTYPE html>
|
| +<!--
|
| +Copyright 2016 The Chromium Authors. All rights reserved.
|
| +Use of this source code is governed by a BSD-style license that can be
|
| +found in the LICENSE file.
|
| +-->
|
| +
|
| +<script>
|
| +'use strict';
|
| +
|
| +tr.exportTo('tr.metrics', function() {
|
| +
|
| + function ValueList(values) {
|
| + if (values !== undefined)
|
| + this.values_ = values;
|
| + else
|
| + this.values_ = [];
|
| + }
|
| +
|
| + ValueList.prototype = {
|
| + get valueDicts() {
|
| + return this.values_.map(function(v) { return v.asDict(); });
|
| + },
|
| +
|
| + addValue: function(v) {
|
| + if (!(v instanceof tr.v.NumericValue)) {
|
| + var err = new Error('Tried to add value ' + v +
|
| + ' which is non-Numeric');
|
| + err.name = 'ValueError';
|
| + throw err;
|
| + }
|
| +
|
| + this.values_.push(v);
|
| + }
|
| + };
|
| +
|
| + return {
|
| + ValueList: ValueList
|
| + };
|
| +});
|
| +</script>
|
|
|