Commit 9865da28 authored by Weilun Shi's avatar Weilun Shi Committed by Commit Bot

Split out Blink* histograms to its own folder

Split out Blink* histograms to histograms_xml/Blink/histograms.xml.
Obsolete Blink* histograms are moved to
histograms_xml/obsolete_histograms.xml.

Bug: 993193
Change-Id: I07023dede0182c8e749b1f7107b0d1caa07349a6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2411342
Commit-Queue: Weilun Shi <sweilun@chromium.org>
Commit-Queue: Rohit Rao <rohitrao@chromium.org>
Reviewed-by: default avatarRohit Rao <rohitrao@chromium.org>
Reviewed-by: default avatarSteven Holte <holte@chromium.org>
Auto-Submit: Weilun Shi <sweilun@chromium.org>
Cr-Commit-Position: refs/heads/master@{#808172}
parent cb86f60f
...@@ -29,10 +29,6 @@ source_set("test_support") { ...@@ -29,10 +29,6 @@ source_set("test_support") {
} }
generate_expired_histograms_array("expired_histograms_array") { generate_expired_histograms_array("expired_histograms_array") {
inputs = [
"//tools/metrics/histograms/histograms.xml",
"//tools/metrics/histograms/enums.xml",
]
namespace = "chrome_metrics" namespace = "chrome_metrics"
header_filename = "expired_histograms_array.h" header_filename = "expired_histograms_array.h"
major_branch_date_filepath = "//chrome/MAJOR_BRANCH_DATE" major_branch_date_filepath = "//chrome/MAJOR_BRANCH_DATE"
......
...@@ -6,9 +6,6 @@ ...@@ -6,9 +6,6 @@
# produce an output file and a source_set to build it. # produce an output file and a source_set to build it.
# #
# Parameters: # Parameters:
# inputs:
# List of file name to read. Each file should be a .xml file with
# histogram descriptions.
# #
# namespace (optional): # namespace (optional):
# Namespace in which the generated code should be scoped. If left empty, # Namespace in which the generated code should be scoped. If left empty,
...@@ -30,7 +27,6 @@ template("generate_expired_histograms_array") { ...@@ -30,7 +27,6 @@ template("generate_expired_histograms_array") {
script = "//tools/metrics/histograms/generate_expired_histograms_array.py" script = "//tools/metrics/histograms/generate_expired_histograms_array.py"
outputs = [ header_filename ] outputs = [ header_filename ]
inputs = invoker.inputs
major_branch_date_filepath = invoker.major_branch_date_filepath major_branch_date_filepath = invoker.major_branch_date_filepath
milestone_filepath = invoker.milestone_filepath milestone_filepath = invoker.milestone_filepath
...@@ -41,10 +37,10 @@ template("generate_expired_histograms_array") { ...@@ -41,10 +37,10 @@ template("generate_expired_histograms_array") {
} }
args += [ args += [
"-o" + rebase_path(root_gen_dir, root_build_dir), "-o" + rebase_path(root_gen_dir, root_build_dir),
"-H" + rebase_path(header_filename, root_gen_dir), "-H" + rebase_path(header_filename, root_gen_dir),
"-d" + rebase_path(major_branch_date_filepath, root_build_dir), "-d" + rebase_path(major_branch_date_filepath, root_build_dir),
"-m" + rebase_path(milestone_filepath, root_build_dir), "-m" + rebase_path(milestone_filepath, root_build_dir),
] + rebase_path(inputs, root_build_dir) ]
} }
} }
...@@ -268,10 +268,6 @@ source_set("eg2_tests") { ...@@ -268,10 +268,6 @@ source_set("eg2_tests") {
import("//components/metrics/generate_expired_histograms_array.gni") import("//components/metrics/generate_expired_histograms_array.gni")
generate_expired_histograms_array("expired_histograms_array") { generate_expired_histograms_array("expired_histograms_array") {
inputs = [
"//tools/metrics/histograms/histograms.xml",
"//tools/metrics/histograms/enums.xml",
]
namespace = "" namespace = ""
header_filename = "ios_expired_histograms_array.h" header_filename = "ios_expired_histograms_array.h"
major_branch_date_filepath = "//chrome/MAJOR_BRANCH_DATE" major_branch_date_filepath = "//chrome/MAJOR_BRANCH_DATE"
......
...@@ -13,6 +13,7 @@ import sys ...@@ -13,6 +13,7 @@ import sys
import extract_histograms import extract_histograms
import merge_xml import merge_xml
import histogram_paths
_DATE_FILE_RE = re.compile(r".*MAJOR_BRANCH_DATE=(.+).*") _DATE_FILE_RE = re.compile(r".*MAJOR_BRANCH_DATE=(.+).*")
_CURRENT_MILESTONE_RE = re.compile(r"MAJOR=([0-9]{2,3})\n") _CURRENT_MILESTONE_RE = re.compile(r"MAJOR=([0-9]{2,3})\n")
...@@ -232,7 +233,7 @@ def _GenerateFile(arguments): ...@@ -232,7 +233,7 @@ def _GenerateFile(arguments):
arguments.major_branch_date_filepath: File path for base date. arguments.major_branch_date_filepath: File path for base date.
arguments.milestone_filepath: File path for milestone information. arguments.milestone_filepath: File path for milestone information.
""" """
descriptions = merge_xml.MergeFiles(arguments.inputs) descriptions = merge_xml.MergeFiles(histogram_paths.ALL_XMLS)
with open(arguments.major_branch_date_filepath, "r") as date_file: with open(arguments.major_branch_date_filepath, "r") as date_file:
branch_file_content = date_file.read() branch_file_content = date_file.read()
with open(arguments.milestone_filepath, "r") as milestone_file: with open(arguments.milestone_filepath, "r") as milestone_file:
...@@ -277,10 +278,6 @@ def _ParseArguments(): ...@@ -277,10 +278,6 @@ def _ParseArguments():
"-m", "-m",
required=True, required=True,
help="A path to the file with the milestone information.") help="A path to the file with the milestone information.")
arg_parser.add_argument(
"inputs",
nargs="+",
help="Paths to .xml files with histogram descriptions.")
return arg_parser.parse_args() return arg_parser.parse_args()
......
This source diff could not be displayed because it is too large. You can view the blob instead.
tools/metrics/histograms/histograms.xml tools/metrics/histograms/histograms.xml
tools/metrics/histograms/histograms_xml/Blink/histograms.xml
tools/metrics/histograms/histograms_xml/Fingerprint/histograms.xml tools/metrics/histograms/histograms_xml/Fingerprint/histograms.xml
tools/metrics/histograms/histograms_xml/UMA/histograms.xml tools/metrics/histograms/histograms_xml/UMA/histograms.xml
tools/metrics/histograms/histograms_xml/histogram_suffixes_list.xml tools/metrics/histograms/histograms_xml/histogram_suffixes_list.xml
\ No newline at end of file
This diff is collapsed.
...@@ -173,7 +173,7 @@ def _WriteDocumentDict(document_dict, output_dir): ...@@ -173,7 +173,7 @@ def _WriteDocumentDict(document_dict, output_dir):
value is a list of nodes or another dict. value is a list of nodes or another dict.
output_dir: The output directory of the resulting folders. output_dir: The output directory of the resulting folders.
""" """
for key, val in document_dict: for key, val in document_dict.items():
if isinstance(val, list): if isinstance(val, list):
_OutputToFolderAndXML(val, output_dir, key) _OutputToFolderAndXML(val, output_dir, key)
else: else:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment