Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1534)

Unified Diff: telemetry/telemetry/internal/results/histogram_set_json_output_formatter.py

Issue 2556213002: Revert of Replace ValueSetOutputFormatter with HistogramSetJsonOutputFormatter. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | telemetry/telemetry/internal/results/html2_output_formatter.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: telemetry/telemetry/internal/results/histogram_set_json_output_formatter.py
diff --git a/telemetry/telemetry/internal/results/histogram_set_json_output_formatter.py b/telemetry/telemetry/internal/results/histogram_set_json_output_formatter.py
deleted file mode 100644
index 6c6f397b498dc71dfcbd674834a94e1aed511b70..0000000000000000000000000000000000000000
--- a/telemetry/telemetry/internal/results/histogram_set_json_output_formatter.py
+++ /dev/null
@@ -1,28 +0,0 @@
-# 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.
-
-import json
-import logging
-
-from telemetry.internal.results import output_formatter
-
-
-class HistogramSetJsonOutputFormatter(output_formatter.OutputFormatter):
- def __init__(self, output_stream, metadata, reset_results):
- super(HistogramSetJsonOutputFormatter, self).__init__(output_stream)
- self._metadata = metadata
- self._reset_results = reset_results
-
- def Format(self, page_test_results):
- histograms = page_test_results.AsHistogramDicts(self._metadata)
- self._output_stream.seek(0)
- if not self._reset_results:
- existing = self._output_stream.read()
- self._output_stream.seek(0)
- if existing:
- try:
- histograms += json.loads(existing)
- except ValueError:
- logging.warn('Found existing histograms json but failed to parse it.')
- json.dump(histograms, self._output_stream)
« no previous file with comments | « no previous file | telemetry/telemetry/internal/results/html2_output_formatter.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698