1 2<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 3<html><head><title>Python: module telemetry.value.scalar</title> 4<meta charset="utf-8"> 5</head><body bgcolor="#f0f0f8"> 6 7<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> 8<tr bgcolor="#7799ee"> 9<td valign=bottom> <br> 10<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="telemetry.html"><font color="#ffffff">telemetry</font></a>.<a href="telemetry.value.html"><font color="#ffffff">value</font></a>.scalar</strong></big></big></font></td 11><td align=right valign=bottom 12><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/value/scalar.py">telemetry/value/scalar.py</a></font></td></tr></table> 13 <p><tt># Copyright 2013 The Chromium Authors. All rights reserved.<br> 14# Use of this source code is governed by a BSD-style license that can be<br> 15# found in the LICENSE file.</tt></p> 16<p> 17<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 18<tr bgcolor="#aa55cc"> 19<td colspan=3 valign=bottom> <br> 20<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> 21 22<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> 23<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="telemetry.value.list_of_scalar_values.html">telemetry.value.list_of_scalar_values</a><br> 24<a href="telemetry.value.none_values.html">telemetry.value.none_values</a><br> 25</td><td width="25%" valign=top><a href="numbers.html">numbers</a><br> 26<a href="telemetry.value.summarizable.html">telemetry.value.summarizable</a><br> 27</td><td width="25%" valign=top><a href="telemetry.value.html">telemetry.value</a><br> 28</td><td width="25%" valign=top></td></tr></table></td></tr></table><p> 29<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 30<tr bgcolor="#ee77aa"> 31<td colspan=3 valign=bottom> <br> 32<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> 33 34<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> 35<td width="100%"><dl> 36<dt><font face="helvetica, arial"><a href="telemetry.value.summarizable.html#SummarizableValue">telemetry.value.summarizable.SummarizableValue</a>(<a href="telemetry.value.html#Value">telemetry.value.Value</a>) 37</font></dt><dd> 38<dl> 39<dt><font face="helvetica, arial"><a href="telemetry.value.scalar.html#ScalarValue">ScalarValue</a> 40</font></dt></dl> 41</dd> 42</dl> 43 <p> 44<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> 45<tr bgcolor="#ffc8d8"> 46<td colspan=3 valign=bottom> <br> 47<font color="#000000" face="helvetica, arial"><a name="ScalarValue">class <strong>ScalarValue</strong></a>(<a href="telemetry.value.summarizable.html#SummarizableValue">telemetry.value.summarizable.SummarizableValue</a>)</font></td></tr> 48 49<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> 50<td width="100%"><dl><dt>Method resolution order:</dt> 51<dd><a href="telemetry.value.scalar.html#ScalarValue">ScalarValue</a></dd> 52<dd><a href="telemetry.value.summarizable.html#SummarizableValue">telemetry.value.summarizable.SummarizableValue</a></dd> 53<dd><a href="telemetry.value.html#Value">telemetry.value.Value</a></dd> 54<dd><a href="__builtin__.html#object">__builtin__.object</a></dd> 55</dl> 56<hr> 57Methods defined here:<br> 58<dl><dt><a name="ScalarValue-AsDict"><strong>AsDict</strong></a>(self)</dt></dl> 59 60<dl><dt><a name="ScalarValue-GetBuildbotDataType"><strong>GetBuildbotDataType</strong></a>(self, output_context)</dt></dl> 61 62<dl><dt><a name="ScalarValue-GetBuildbotValue"><strong>GetBuildbotValue</strong></a>(self)</dt></dl> 63 64<dl><dt><a name="ScalarValue-GetRepresentativeNumber"><strong>GetRepresentativeNumber</strong></a>(self)</dt></dl> 65 66<dl><dt><a name="ScalarValue-GetRepresentativeString"><strong>GetRepresentativeString</strong></a>(self)</dt></dl> 67 68<dl><dt><a name="ScalarValue-__init__"><strong>__init__</strong></a>(self, page, name, units, value, important<font color="#909090">=True</font>, description<font color="#909090">=None</font>, tir_label<font color="#909090">=None</font>, none_value_reason<font color="#909090">=None</font>, improvement_direction<font color="#909090">=None</font>)</dt><dd><tt>A single value (float or integer) result from a test.<br> 69 <br> 70A test that counts the number of DOM elements in a page might produce a<br> 71scalar value:<br> 72 <a href="#ScalarValue">ScalarValue</a>(page, 'num_dom_elements', 'count', num_elements)</tt></dd></dl> 73 74<dl><dt><a name="ScalarValue-__repr__"><strong>__repr__</strong></a>(self)</dt></dl> 75 76<hr> 77Class methods defined here:<br> 78<dl><dt><a name="ScalarValue-MergeLikeValuesFromDifferentPages"><strong>MergeLikeValuesFromDifferentPages</strong></a>(cls, values)<font color="#909090"><font face="helvetica, arial"> from <a href="__builtin__.html#type">__builtin__.type</a></font></font></dt></dl> 79 80<dl><dt><a name="ScalarValue-MergeLikeValuesFromSamePage"><strong>MergeLikeValuesFromSamePage</strong></a>(cls, values)<font color="#909090"><font face="helvetica, arial"> from <a href="__builtin__.html#type">__builtin__.type</a></font></font></dt></dl> 81 82<hr> 83Static methods defined here:<br> 84<dl><dt><a name="ScalarValue-FromDict"><strong>FromDict</strong></a>(value_dict, page_dict)</dt></dl> 85 86<dl><dt><a name="ScalarValue-GetJSONTypeName"><strong>GetJSONTypeName</strong></a>()</dt></dl> 87 88<hr> 89Methods inherited from <a href="telemetry.value.summarizable.html#SummarizableValue">telemetry.value.summarizable.SummarizableValue</a>:<br> 90<dl><dt><a name="ScalarValue-AsDictWithoutBaseClassEntries"><strong>AsDictWithoutBaseClassEntries</strong></a>(self)</dt></dl> 91 92<hr> 93Data descriptors inherited from <a href="telemetry.value.summarizable.html#SummarizableValue">telemetry.value.summarizable.SummarizableValue</a>:<br> 94<dl><dt><strong>improvement_direction</strong></dt> 95</dl> 96<hr> 97Methods inherited from <a href="telemetry.value.html#Value">telemetry.value.Value</a>:<br> 98<dl><dt><a name="ScalarValue-GetChartAndTraceNameForComputedSummaryResult"><strong>GetChartAndTraceNameForComputedSummaryResult</strong></a>(self, trace_tag)</dt></dl> 99 100<dl><dt><a name="ScalarValue-GetChartAndTraceNameForPerPageResult"><strong>GetChartAndTraceNameForPerPageResult</strong></a>(self)</dt></dl> 101 102<dl><dt><a name="ScalarValue-IsMergableWith"><strong>IsMergableWith</strong></a>(self, that)</dt></dl> 103 104<dl><dt><a name="ScalarValue-__eq__"><strong>__eq__</strong></a>(self, other)</dt></dl> 105 106<dl><dt><a name="ScalarValue-__hash__"><strong>__hash__</strong></a>(self)</dt></dl> 107 108<hr> 109Static methods inherited from <a href="telemetry.value.html#Value">telemetry.value.Value</a>:<br> 110<dl><dt><a name="ScalarValue-GetConstructorKwArgs"><strong>GetConstructorKwArgs</strong></a>(value_dict, page_dict)</dt><dd><tt>Produces constructor arguments from a value dict and a page dict.<br> 111 <br> 112Takes a dict parsed from JSON and an index of pages and recovers the<br> 113keyword arguments to be passed to the constructor for deserializing the<br> 114dict.<br> 115 <br> 116value_dict: a dictionary produced by <a href="#ScalarValue-AsDict">AsDict</a>() on a value subclass.<br> 117page_dict: a dictionary mapping IDs to page objects.</tt></dd></dl> 118 119<dl><dt><a name="ScalarValue-ListOfValuesFromListOfDicts"><strong>ListOfValuesFromListOfDicts</strong></a>(value_dicts, page_dict)</dt><dd><tt>Takes a list of value dicts to values.<br> 120 <br> 121Given a list of value dicts produced by AsDict, this method<br> 122deserializes the dicts given a dict mapping page IDs to pages.<br> 123This method performs memoization for deserializing a list of values<br> 124efficiently, where FromDict is meant to handle one-offs.<br> 125 <br> 126values: a list of value dicts produced by <a href="#ScalarValue-AsDict">AsDict</a>() on a value subclass.<br> 127page_dict: a dictionary mapping IDs to page objects.</tt></dd></dl> 128 129<hr> 130Data descriptors inherited from <a href="telemetry.value.html#Value">telemetry.value.Value</a>:<br> 131<dl><dt><strong>__dict__</strong></dt> 132<dd><tt>dictionary for instance variables (if defined)</tt></dd> 133</dl> 134<dl><dt><strong>__weakref__</strong></dt> 135<dd><tt>list of weak references to the object (if defined)</tt></dd> 136</dl> 137<dl><dt><strong>name_suffix</strong></dt> 138<dd><tt>Returns the string after a . in the name, or the full name otherwise.</tt></dd> 139</dl> 140</td></tr></table></td></tr></table> 141</body></html>