[tools] Keep raw data in the generated JSON for debugging purposes

R=machenbach@chromium.org

Bug: chromium:861668
Change-Id: Ic3225ed5919c21a7f6a9f21cba4aa491e1d6606d
Reviewed-on: https://chromium-review.googlesource.com/1140331
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54508}
This commit is contained in:
Sergiy Byelozyorov 2018-07-17 18:42:17 +02:00 committed by Commit Bot
parent 7f67cbd4d1
commit 1e1cca61da

View File

@ -18,6 +18,7 @@ For each command, you can try ./runtime-call-stats.py help command.
'''
import argparse
import copy
import json
import os
import re
@ -554,6 +555,8 @@ def do_json(args):
if domain not in versions[version]: versions[version][domain] = {}
read_stats(os.path.join(root, filename),
versions[version][domain], args)
# TODO(sergiyb): Remove after resolving https://crbug.com/861668.
raw_data = copy.deepcopy(versions)
for version, domains in versions.items():
if args.aggregate:
create_total_page_stats(domains, args)
@ -570,6 +573,8 @@ def do_json(args):
entry.append(round(s['ci']['perc'], 2))
stats.append(entry)
domains[domain] = stats
# TODO(sergiyb): Remove after resolving https://crbug.com/861668.
versions['raw_data'] = raw_data
print json.dumps(versions, separators=(',', ':'))