OLD | NEW |
(Empty) | |
| 1 # Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. |
| 4 |
| 5 import os |
| 6 import vinn |
| 7 import tracing_project |
| 8 |
| 9 def HistogramsToCsv(json_path): |
| 10 """Convert HistogramSet JSON to CSV. |
| 11 |
| 12 Args: |
| 13 json_path: path to a file containing HistogramSet JSON |
| 14 |
| 15 Returns: |
| 16 a Vinn result object whose 'returncode' indicates whether there was an |
| 17 exception, and whose 'stdout' contains CSV. |
| 18 """ |
| 19 return vinn.RunFile( |
| 20 os.path.join(os.path.dirname(__file__), 'histograms_to_csv_cmdline.html'), |
| 21 source_paths=list(tracing_project.TracingProject().source_paths), |
| 22 js_args=[os.path.abspath(json_path)]) |
OLD | NEW |