12点到1点是什么时辰| 阴唇为什么一大一小| 脸上长痣是什么原因| 醒面是什么意思| 女性下体长什么样| 血压200意味着什么| 走路快的人是什么性格| 什么只好什么| 迂回什么意思| 头总出汗是什么原因| 什么天揽月| 热血病是什么病| 韭菜补什么| 蛋白石是什么| 落花生是什么意思| 翘首以盼什么意思| 1963年属什么生肖| 有什么无什么的成语| 拼音b像什么| pose是什么意思| 白头发吃什么可以变黑| 毓婷是什么药| 属猪和什么属相最配| 2038年是什么年| 包皮是什么样子图片| 肠痉挛有什么症状| 胸闷想吐是什么原因| 今天股市为什么大跌| 冬虫夏草是什么东西| 狂狷是什么意思| 射手座的幸运色是什么| 珠海有什么好玩的| 婴儿蚊虫叮咬红肿用什么药| 乳腺导管局限性扩张是什么意思| 乙肝病毒表面抗体高是什么意思| 三个土什么字| i是什么| 俄罗斯乌拉是什么意思| 五官端正是什么意思| 胸闷气短咳嗽是什么原因引起的| 四月十四日是什么节日| 眼睛干痒用什么眼药水比较好| 胆结石吃什么| 属狗的和什么属相最配| 李自成为什么会失败| 笔走龙蛇是什么生肖| 四不像是指什么动物| 甘露丸是什么| 老舍为什么自杀| 冰醋酸是什么| 加持什么意思| 房性早搏吃什么药| 夏天喝什么茶最好| 西瓜虫吃什么| 可乐加味精女人喝了什么效果| 兰花长什么样| 41岁属什么| 2月11号是什么星座| 梦见红枣树上结满红枣代表什么| 8月1号是什么星座| 大四什么时候毕业| 渗透压偏高是什么原因| 03属什么生肖| 海参几头是什么意思| 子夜是指什么时间| 素毛肚是什么做的| 什么是静电| 转氨酶偏高吃什么药| 埋汰什么意思| 2002年五行属什么命| 维生素b补什么| 动脉硬化吃什么| 为什么一同房就出血| 亮晶晶的什么填空| 感冒吃什么水果好| 中医调理身体挂什么科| 拉肚子什么原因| 梦见家里水管漏水是什么意思| 小姐姐是什么意思| 耋是什么意思| 消炎药不能和什么一起吃| 糗事是什么意思| 理想主义是什么意思| 阴道松弛吃什么药| 怀孕梦到蛇预示着什么| 侍寝是什么意思| 缘起是什么意思| 生辰纲是什么东西| 视力矫正是什么意思| 多囊卵巢综合症吃什么药| 什么是内分泌失调| bacardi是什么酒| 蜂鸟是什么鸟| 配菜是什么意思| 唇红齿白是什么生肖| 糖类抗原125是什么意思| 香油吃多了有什么害处| 蹦蹦跳跳的动物是什么生肖| 前羽念什么| 医学五行属什么| 鼻窦炎吃什么药效果好| 3点是什么时辰| 提手旁加茶念什么| 三省吾身是什么意思| 中焦湿热吃什么中成药| 十一月份出生的是什么星座| 头疼吃什么药好| 孙字五行属什么| 什么症状提示月经马上要来了| 副乳是什么原因造成的| 6.22什么星座| 25羟基维生素d是什么| 降真香是什么| 女性更年期吃什么药| 脱发用什么药最好| 偏头痛什么症状| 一什么鱼| 轻度三尖瓣反流是什么| 华西医院院长什么级别| 迪拜货币叫什么| 金丝雀是什么意思| 什么样的情况下会怀孕| 长期喝酒对身体有什么危害| 4月份什么星座| 9月三号是什么日子| 橡皮泥可以做什么| 心什么| 为什么单位不愿意申请工伤| 伊维菌素是什么药| 辣椒是什么科| 移动硬盘什么牌子好| 银行卡开户名是什么| 部队大校是什么级别| 霸是什么生肖| 心急吃不了热豆腐什么意思| 腰困是什么原因| 吃华法林不能吃什么| 血小板为什么会高| 西瓜吃了有什么好处| 潘驴邓小闲是什么意思| 吃什么可以偷偷流产| 死鱼眼是什么样子的| 背后长痘痘什么原因| penis什么意思| fl是胎儿的什么| 屁多且臭是什么原因| 梦见自己杀人了是什么意思| 开火上下结构念什么| 酸枣仁配什么治疗失眠| 拉肚子想吐是什么原因| 惊蛰后是什么节气| 持续是什么意思| 梦到挖坟墓是什么意思| 头层牛皮除牛反绒是什么意思| 嗓子痒控制不住咳嗽是什么原因| john是什么意思| 晚上脚抽筋是什么原因| 金项链断了有什么预兆| 治疗幽门螺杆菌用什么药效果最好| 马走日是什么意思| 血压为什么高| 无语是什么意思| 脑供血不足吃什么药最好| 鼻咽癌有什么症状| 老是掉发是什么原因| 看乳腺挂什么科| 病理报告是什么| 绿头牌是什么意思| 什么是粒子| 反复低烧是什么原因| 什么家欢乐| 嘴唇有痣代表什么| 急性肠炎吃什么药| 前列腺吃什么药见效快| 鹅喜欢吃什么食物| 宜家宜室什么意思| 旺夫脸是什么脸型| 200年属什么生肖| 数字5代表什么意思| 看输卵管是否堵塞做什么检查| 首台套是什么意思| 黑户是什么| 什么是感性| 抗氧化是什么意思| 李健为什么退出水木年华| 头孢克肟和头孢拉定有什么区别| 爱奇艺积分有什么用| 一个月来两次月经是什么原因| 心跳过速是什么原因| 矫正视力什么意思| 来月经腰酸腰痛什么原因造成的| 辐照食品什么意思| 苹果不能和什么一起吃| 冰点脱毛的原理是什么| 阴囊瘙痒是什么原因| 美莎片是什么药| 共青团书记是什么级别| 仓鼠爱吃什么东西| 纳氏囊肿是什么意思| 女人适合喝什么茶最好| 耳洞为什么会发臭| 鸡茸是什么东西| 护理专业是做什么的| 哈工大全称是什么| 无病呻吟是什么意思| 轻浮的女人是什么意思| 小学什么时候放假| 倪妮和倪萍什么关系| bb霜和cc霜有什么区别| 男人耳后有痣代表什么| 脊柱侧弯挂什么科| 什么是活珠子| 半盏流年是什么意思| 活性酶是什么| 耽美是什么| 纺锤形是什么形状| 为什么糙米越吃血糖越高| 甲醛什么气味| 结婚14年是什么婚| 辟邪是什么意思| 溶液是什么| 蜻蜓是什么动物| 猪八戒的武器叫什么| 指甲黑是什么原因| 孕妇鼻子出血是什么原因| 今年什么时候立秋| 蟑螂喜欢什么样的环境| 矿油是什么| ca125是查什么的| 钾低了会出现什么症状| 太阳花什么时候开花| 阻力是什么意思| 1966年属马的是什么命| 孕早期吃什么有利于胎心胎芽发育| 朴树是什么树| 鱼疗是什么鱼| 什么什么为什么| 胃酸烧心吃什么药| 咪咪头疼是什么原因| 没有料酒可以用什么代替| 毒血症是什么病| 纪念礼物送什么好| 老年痴呆症是什么原因引起的| 婴儿呛奶是什么原因引起的| 什么玻璃| 儿童低烧吃什么药| 疳积是什么病| 陀螺是什么意思| 本命年为什么不能结婚| 血常规什么颜色的管子| 甘薯和红薯有什么区别| 霸王别姬是什么菜| 脚痒脱皮是什么原因| 小孩出汗多是什么原因造成的| 水母吃什么食物| 唇炎属于什么科| 8是什么意思| 别见怪是什么意思| 脊柱炎是什么症状| 吊龙是什么| 脚肿吃什么药| 忧思是什么意思| 海苔是什么做的| 慕斯蛋糕是什么意思| 百度
blob: 45c23c7dc8a2eda6d3b4ba306e31cf0e2291b757 [file] [log] [blame]
#!/usr/bin/env python3
# Copyright 2023 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# Script that compares the metrics when running Autofill captured site tests
# with some features enabled and disabled.
# Run from the root of the Chromium src directory. -h for help.
# The tool expects that the captured_sites_interactive_tests binary is built.
import argparse, json, os, urllib.parse
# Extracts the names of all non-disabled captured site tests.
def get_all_sites():
with open("chrome/test/data/autofill/captured_sites/artifacts/testcases.json",
"r") as f:
return (site["site_name"] for site in json.loads(f.read())["tests"]
if not site.get("disabled", False))
# Command line args.
parser = argparse.ArgumentParser(epilog="List of tests: " +
", ".join(get_all_sites()))
parser.add_argument(
"target",
help=("Build target of captured_sites_interactive_tests binary. "
"For example, Default. The binary should already exist."))
parser.add_argument("features", help="A comma-separated list of feature names.")
parser.add_argument(
"-r",
dest="histogram_regex",
help=("A regex matching the histogram names that should be dumped. If not "
"specified, the metrics of all histograms dumped."))
parser.add_argument(
"-o",
dest="output",
default="/tmp/",
help=("Directory to record the metrics into. Creates files per test, named"
" after the test case."))
parser.add_argument(
"-t",
dest="test",
help="Test case. If no test is specified, all tests are run.")
parser.add_argument("-s",
dest="silent",
action="store_true",
help="Don't print test output.")
args = parser.parse_args()
# The captured_sites_interactive_tests binary should be built.
captured_site_tests = "out/%s/captured_sites_interactive_tests" % args.target
assert os.path.exists(captured_site_tests)
# Runs the capture site test for `site` and scrapes the metrics.
# args.features is enabled/disabled depending on `features_enabled`.
def run_test(site, features_enabled):
cmd = "./" + captured_site_tests
cmd += (" --gtest_filter="
"All/AutofillCapturedSitesInteractiveTest.Recipe/" + site)
# Enable scraping tools. Special characters need to be escaped.
cmd += " --enable-features=AutofillCapturedSiteTestsMetricsScraper"
cmd += ":output_dir/" + urllib.parse.quote(args.output, safe="")
if args.histogram_regex is not None:
cmd += "/histogram_regex/" + urllib.parse.quote(args.histogram_regex,
safe="")
# En- or disable features.
if features_enabled:
cmd += "," + args.features
else:
cmd += " --disable-features=" + args.features
# Random arguments that the captured site tests recommend.
cmd += " --enable-pixel-output-in-tests"
cmd += " --test-launcher-timeout=10000000"
cmd += " --ui-test-action-max-timeout=10000000"
cmd += (" --vmodule=captured_sites_test_utils=2\,"
"autofill_captured_sites_interactive_uitest=1")
# Maybe disable output.
if args.silent:
cmd += " > /dev/null 2>&1"
# Run
os.system(cmd)
# Runs the captured site test `site` twice. Once with `args.features` enabled
# and once with the feature disabled.
# Diffs the metrics collected.
def run_tests_and_diff(site):
print("Testing %s..." % site)
def file_name(infix):
return "%s/%s%s.txt" % (args.output, site, infix)
# `output` is where the captured site test will write to. Rename the file
# afterwards to distinguish between enabled/disabled state.
output = file_name("")
result_enabled = file_name("_enabled")
result_disabled = file_name("_disabled")
print("Running with features enabled. Results at " + result_enabled)
run_test(site, True)
os.rename(output, result_enabled)
print("Running with features disabled. Results at " + result_disabled)
run_test(site, False)
os.rename(output, result_disabled)
print("Comparing metrics (no output means no diff)")
os.system("diff %s %s" % (result_enabled, result_disabled))
print("")
# If a test is specified, only run that specific test. Otherwise run all.
if args.test is None:
for site in get_all_sites():
run_tests_and_diff(site)
else:
run_tests_and_diff(args.test)
血液肿瘤是什么病 支原体感染吃什么食物好 人为什么会失眠 2楼五行属什么 梦见吃油饼是什么意思
梦见朋友怀孕了是什么意思 磨破皮了涂什么药 什么的大叫 7月26日是什么星座 身份证照片穿什么颜色衣服
微信屏蔽是什么意思 茱萸是什么意思 脖子出汗多是什么原因女人 血压高吃什么药最好 希腊脚是什么意思
浅表性胃炎是什么意思 白茶什么样的好 女人一般什么时候绝经 私是什么意思 上火牙龈肿痛吃什么药
博大精深什么意思hcv9jop7ns5r.cn 饣与什么有关hcv7jop5ns6r.cn 澄面是什么面粉hcv9jop0ns2r.cn 两肺纤维灶是什么意思hcv9jop3ns8r.cn 尔昌尔炽什么意思hcv8jop5ns5r.cn
叫花子是什么意思hcv9jop0ns5r.cn 体内湿气重吃什么药效果好hcv8jop8ns6r.cn 柔式按摩是什么意思hcv9jop2ns6r.cn 什么是甲沟炎图片hcv7jop5ns5r.cn 心电图诊断窦性心律什么意思hcv7jop9ns2r.cn
足底筋膜炎什么症状hcv8jop6ns5r.cn 回归线是什么clwhiglsz.com 失代偿期的肝是属于什么程度shenchushe.com 什么是普拉提ff14chat.com 姨妈痛吃什么药hanqikai.com
上海副市长什么级别hcv9jop7ns0r.cn 眼睛屈光不正是什么hcv7jop9ns8r.cn 护理部是干什么的hcv7jop7ns1r.cn fdp偏高是什么原因hcv9jop7ns3r.cn 羊肉和什么菜包饺子好吃hcv9jop8ns1r.cn
百度