<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module telemetry.value.trace</title>
<meta charset="utf-8">
</head><body bgcolor="#f0f0f8">
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom> <br>
<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>.trace</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/value/trace.py">telemetry/value/trace.py</a></font></td></tr></table>
<p><tt># Copyright 2014 The Chromium Authors. All rights reserved.<br>
# Use of this source code is governed by a BSD-style license that can be<br>
# found in the LICENSE file.</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="StringIO.html">StringIO</a><br>
<a href="catapult_base.cloud_storage.html">catapult_base.cloud_storage</a><br>
<a href="datetime.html">datetime</a><br>
<a href="telemetry.internal.util.file_handle.html">telemetry.internal.util.file_handle</a><br>
</td><td width="25%" valign=top><a href="logging.html">logging</a><br>
<a href="os.html">os</a><br>
<a href="random.html">random</a><br>
<a href="shutil.html">shutil</a><br>
</td><td width="25%" valign=top><a href="sys.html">sys</a><br>
<a href="tempfile.html">tempfile</a><br>
<a href="tracing_build.trace2html.html">tracing_build.trace2html</a><br>
<a href="telemetry.timeline.trace_data.html">telemetry.timeline.trace_data</a><br>
</td><td width="25%" valign=top><a href="telemetry.value.html">telemetry.value</a><br>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="telemetry.value.html#Value">telemetry.value.Value</a>(<a href="__builtin__.html#object">__builtin__.object</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="telemetry.value.trace.html#TraceValue">TraceValue</a>
</font></dt></dl>
</dd>
</dl>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="TraceValue">class <strong>TraceValue</strong></a>(<a href="telemetry.value.html#Value">telemetry.value.Value</a>)</font></td></tr>
<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="telemetry.value.trace.html#TraceValue">TraceValue</a></dd>
<dd><a href="telemetry.value.html#Value">telemetry.value.Value</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="TraceValue-AsDict"><strong>AsDict</strong></a>(self)</dt></dl>
<dl><dt><a name="TraceValue-CleanUp"><strong>CleanUp</strong></a>(self)</dt><dd><tt>Cleans up tempfile after it is no longer needed.<br>
<br>
A cleaned up <a href="#TraceValue">TraceValue</a> cannot be used for further operations. <a href="#TraceValue-CleanUp">CleanUp</a>()<br>
may be called more than once without error.</tt></dd></dl>
<dl><dt><a name="TraceValue-GetBuildbotDataType"><strong>GetBuildbotDataType</strong></a>(self, output_context)</dt></dl>
<dl><dt><a name="TraceValue-GetBuildbotValue"><strong>GetBuildbotValue</strong></a>(self)</dt></dl>
<dl><dt><a name="TraceValue-GetRepresentativeNumber"><strong>GetRepresentativeNumber</strong></a>(self)</dt></dl>
<dl><dt><a name="TraceValue-GetRepresentativeString"><strong>GetRepresentativeString</strong></a>(self)</dt></dl>
<dl><dt><a name="TraceValue-Serialize"><strong>Serialize</strong></a>(self, dir_path)</dt></dl>
<dl><dt><a name="TraceValue-UploadToCloud"><strong>UploadToCloud</strong></a>(self, bucket)</dt></dl>
<dl><dt><a name="TraceValue-__enter__"><strong>__enter__</strong></a>(self)</dt></dl>
<dl><dt><a name="TraceValue-__exit__"><strong>__exit__</strong></a>(self, _, __, ___)</dt></dl>
<dl><dt><a name="TraceValue-__init__"><strong>__init__</strong></a>(self, page, trace_data, important<font color="#909090">=False</font>, description<font color="#909090">=None</font>)</dt><dd><tt>A value that contains a TraceData object and knows how to<br>
output it.<br>
<br>
Adding TraceValues and outputting as JSON will produce a directory full of<br>
HTML files called trace_files. Outputting as chart JSON will also produce<br>
an index, files.html, linking to each of these files.</tt></dd></dl>
<dl><dt><a name="TraceValue-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
<hr>
Class methods defined here:<br>
<dl><dt><a name="TraceValue-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>
<dl><dt><a name="TraceValue-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>
<hr>
Static methods defined here:<br>
<dl><dt><a name="TraceValue-GetJSONTypeName"><strong>GetJSONTypeName</strong></a>()</dt></dl>
<hr>
Data descriptors defined here:<br>
<dl><dt><strong>cleaned_up</strong></dt>
</dl>
<hr>
Methods inherited from <a href="telemetry.value.html#Value">telemetry.value.Value</a>:<br>
<dl><dt><a name="TraceValue-AsDictWithoutBaseClassEntries"><strong>AsDictWithoutBaseClassEntries</strong></a>(self)</dt></dl>
<dl><dt><a name="TraceValue-GetChartAndTraceNameForComputedSummaryResult"><strong>GetChartAndTraceNameForComputedSummaryResult</strong></a>(self, trace_tag)</dt></dl>
<dl><dt><a name="TraceValue-GetChartAndTraceNameForPerPageResult"><strong>GetChartAndTraceNameForPerPageResult</strong></a>(self)</dt></dl>
<dl><dt><a name="TraceValue-IsMergableWith"><strong>IsMergableWith</strong></a>(self, that)</dt></dl>
<dl><dt><a name="TraceValue-__eq__"><strong>__eq__</strong></a>(self, other)</dt></dl>
<dl><dt><a name="TraceValue-__hash__"><strong>__hash__</strong></a>(self)</dt></dl>
<hr>
Static methods inherited from <a href="telemetry.value.html#Value">telemetry.value.Value</a>:<br>
<dl><dt><a name="TraceValue-FromDict"><strong>FromDict</strong></a>(value_dict, page_dict)</dt><dd><tt>Produces a value from a value dict and a page dict.<br>
<br>
<a href="telemetry.value.html#Value">Value</a> dicts are produced by serialization to JSON, and must be accompanied<br>
by a dict mapping page IDs to pages, also produced by serialization, in<br>
order to be completely deserialized. If deserializing multiple values, use<br>
ListOfValuesFromListOfDicts instead.<br>
<br>
value_dict: a dictionary produced by <a href="#TraceValue-AsDict">AsDict</a>() on a value subclass.<br>
page_dict: a dictionary mapping IDs to page objects.</tt></dd></dl>
<dl><dt><a name="TraceValue-GetConstructorKwArgs"><strong>GetConstructorKwArgs</strong></a>(value_dict, page_dict)</dt><dd><tt>Produces constructor arguments from a value dict and a page dict.<br>
<br>
Takes a dict parsed from JSON and an index of pages and recovers the<br>
keyword arguments to be passed to the constructor for deserializing the<br>
dict.<br>
<br>
value_dict: a dictionary produced by <a href="#TraceValue-AsDict">AsDict</a>() on a value subclass.<br>
page_dict: a dictionary mapping IDs to page objects.</tt></dd></dl>
<dl><dt><a name="TraceValue-ListOfValuesFromListOfDicts"><strong>ListOfValuesFromListOfDicts</strong></a>(value_dicts, page_dict)</dt><dd><tt>Takes a list of value dicts to values.<br>
<br>
Given a list of value dicts produced by AsDict, this method<br>
deserializes the dicts given a dict mapping page IDs to pages.<br>
This method performs memoization for deserializing a list of values<br>
efficiently, where FromDict is meant to handle one-offs.<br>
<br>
values: a list of value dicts produced by <a href="#TraceValue-AsDict">AsDict</a>() on a value subclass.<br>
page_dict: a dictionary mapping IDs to page objects.</tt></dd></dl>
<hr>
Data descriptors inherited from <a href="telemetry.value.html#Value">telemetry.value.Value</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary for instance variables (if defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list of weak references to the object (if defined)</tt></dd>
</dl>
<dl><dt><strong>name_suffix</strong></dt>
<dd><tt>Returns the string after a . in the name, or the full name otherwise.</tt></dd>
</dl>
</td></tr></table></td></tr></table>
</body></html>