telemetry.internal.results.chart_json_output_formatter | index telemetry/internal/results/chart_json_output_formatter.py

`# Copyright 2014 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.`

Modules
`` |  |

collections itertools | json telemetry.internal.results.output_formatter | telemetry.value.summary |

Classes
`` |  |

telemetry.internal.results.output_formatter.OutputFormatter(__builtin__.object)
  ChartJsonOutputFormatter

class ChartJsonOutputFormatter(telemetry.internal.results.output_formatter.OutputFormatter)
`` | `# TODO(eakuefner): Transition this to translate Telemetry JSON.`

Method resolution order:
  ChartJsonOutputFormatter
  telemetry.internal.results.output_formatter.OutputFormatter
  __builtin__.object

Methods defined here:

Format(self, page_test_results)

__init__(self, output_stream, benchmark_metadata)

Data descriptors inherited from telemetry.internal.results.output_formatter.OutputFormatter:

__dict__
  `dictionary for instance variables (if defined)`

__weakref__
  `list of weak references to the object (if defined)`

output_stream

Functions
`` |  |

ResultsAsChartDict(benchmark_metadata, page_specific_values, summary_values)
  `Produces a dict for serialization to Chart JSON format from raw values.
  Chart JSON is a transformation of the basic Telemetry JSON format that
  removes the page map, summarizes the raw values, and organizes the results
  by chart and trace name. This function takes the key pieces of data needed to
  perform this transformation (namely, lists of values and a benchmark metadata
  object) and processes them into a dict which can be serialized using the json
  module.
  Design doc for schema: http://goo.gl/kOtf1Y
  Args:
  page_specific_values: list of page-specific values
  summary_values: list of summary values
  benchmark_metadata: a benchmark.BenchmarkMetadata object
  Returns:
  A Chart JSON dict corresponding to the given data.`