diff --git a/scripts/compare/run_three_rp_10run_benchmark.py b/scripts/compare/run_three_rp_10run_benchmark.py
index b9964fa..c2b24fc 100755
--- a/scripts/compare/run_three_rp_10run_benchmark.py
+++ b/scripts/compare/run_three_rp_10run_benchmark.py
@@ -425,15 +425,19 @@ def prepare_rpki_client_official_tree(tag: str) -> None:
raise SystemExit(f"rpki-client worktree dirty; refusing checkout:\n{git_status(RPKI_CLIENT_ROOT)}")
run_local(["git", "checkout", tag], cwd=RPKI_CLIENT_ROOT)
update_branch = f"rpki-client-{tag}"
- update_result = run_local(["./update.sh", update_branch], cwd=RPKI_CLIENT_ROOT, check=False)
- if update_result.returncode != 0:
- print(
- f"warning: ./update.sh {update_branch} failed; falling back to local openbsd checkout",
- file=sys.stderr,
- )
- print(update_result.stdout, file=sys.stderr)
- print(update_result.stderr, file=sys.stderr)
+ local_ref = run_local(["git", "rev-parse", "--verify", update_branch], cwd=RPKI_CLIENT_ROOT / "openbsd", check=False)
+ if local_ref.returncode == 0:
restore_rpki_client_sources_from_local_openbsd(update_branch)
+ else:
+ update_result = run_local(["./update.sh", update_branch], cwd=RPKI_CLIENT_ROOT, check=False)
+ if update_result.returncode != 0:
+ print(
+ f"warning: ./update.sh {update_branch} failed; falling back to local openbsd checkout",
+ file=sys.stderr,
+ )
+ print(update_result.stdout, file=sys.stderr)
+ print(update_result.stderr, file=sys.stderr)
+ restore_rpki_client_sources_from_local_openbsd(update_branch)
configure_env = rpki_client_configure_env()
prefix = DEV_ROOT / ".cache" / "rpki-client-9.8-cir"
run_local(
@@ -449,7 +453,9 @@ def prepare_rpki_client_official_tree(tag: str) -> None:
run_local(["make", "clean"], cwd=RPKI_CLIENT_ROOT, check=False, capture=False)
run_local(["make", f"-j{max(2, min(os.cpu_count() or 2, 8))}"], cwd=RPKI_CLIENT_ROOT, env=configure_env, capture=False)
binary = RPKI_CLIENT_ROOT / "src" / "rpki-client"
- version = run_local([str(binary), "-V"]).stdout.strip()
+ version_result = run_local([str(binary), "-V"])
+ version_lines = [line.strip() for text in (version_result.stdout, version_result.stderr) for line in text.splitlines() if line.strip()]
+ version = version_lines[-1] if version_lines else ""
if version != f"rpki-client-portable {tag}":
raise SystemExit(f"unexpected rpki-client version after build: {version}")
source_text = (RPKI_CLIENT_ROOT / "src" / "http.c").read_text(encoding="utf-8", errors="replace")
@@ -725,7 +731,10 @@ def remote_shell_for_rp(rp: str, run_index: int, mode: str, rirs: list[str], rem
return timed_script(run_dir, reset, argv)
if rp == "rpki-client":
skiplist = f"{state_dir}/skiplist"
- argv = [f"{remote_root}/bin/rpki-client", "-j", "-c", "-S", skiplist, "-d", f"{state_dir}/cache"]
+ argv = [f"{remote_root}/bin/rpki-client"]
+ if args.rpki_client_parser_workers:
+ argv.extend(["-p", str(args.rpki_client_parser_workers)])
+ argv.extend(["-j", "-c", "-S", skiplist, "-d", f"{state_dir}/cache"])
for rir in rirs:
argv.extend(["-t", f"{fixture_dir}/tal/{RIR_TAL[rir]}"])
argv.append(run_dir)
@@ -1033,6 +1042,7 @@ def process_outputs(args: argparse.Namespace, binary_meta: dict[str, Any], rirs:
"schedule": args.schedule,
"oursRsyncScope": args.ours_rsync_scope,
"routinatorEnableAspa": args.routinator_enable_aspa,
+ "rpkiClientParserWorkers": args.rpki_client_parser_workers,
"remoteRoot": args.remote_root,
"sshTarget": args.ssh_target,
"rpResults": rp_results,
@@ -1501,6 +1511,10 @@ def write_html_report(path: Path, report: dict[str, Any]) -> None:
f"--schedule {report.get('schedule', 'round-robin')} --ours-rsync-scope {report.get('oursRsyncScope', '')} "
"--routinator-enable-aspa"
)
+ rpki_client_parser_workers = int(report.get("rpkiClientParserWorkers", 0) or 0)
+ rpki_client_p_arg = f" -p {rpki_client_parser_workers}" if rpki_client_parser_workers else ""
+ rpki_client_p_cli = f" --rpki-client-parser-workers {rpki_client_parser_workers}" if rpki_client_parser_workers else ""
+ command += rpki_client_p_cli
html_text = f"""
@@ -1523,7 +1537,7 @@ footer {{ color:#64748b; font-size:13px; margin-top:28px; }} @media (max-width:9
三 RP Round-Robin 性能与产物对比报告
- all5 live 十轮对比,调度顺序为 rp1 run1 → rp2 run1 → rp3 run1 → rp1 run2 ...;ours RP 使用 {h(report.get('oursRsyncScope', ''))},Routinator 启用 --enable-aspa,rpki-client 使用 official 9.8 正确构建。
+ all5 live 十轮对比,调度顺序为 rp1 run1 → rp2 run1 → rp3 run1 → rp1 run2 ...;ours RP 使用 {h(report.get('oursRsyncScope', ''))},Routinator 启用 --enable-aspa,rpki-client 使用 official 9.8{h(rpki_client_p_arg)} 正确构建。
@@ -1543,7 +1557,7 @@ footer {{ color:#64748b; font-size:13px; margin-top:28px; }} @media (max-width:9
RIR:{h(','.join(report['rirs']))}调度:{h(report.get('schedule', ''))}
关键变量
- ours RP:
--rsync-scope {h(report.get('oursRsyncScope', ''))}
- - Routinator:
--enable-aspa - rpki-client:official
9.8,本地 fixture TAL/TA
+ - Routinator:
--enable-aspa - rpki-client:official
9.8{h(rpki_client_p_arg)},本地 fixture TAL/TA
- 首轮 snapshot,后续 delta
{h(command)}
@@ -1572,6 +1586,7 @@ def write_xml(path: Path, report: dict[str, Any]) -> None:
"schedule": str(report.get("schedule", "")),
"oursRsyncScope": str(report.get("oursRsyncScope", "")),
"routinatorEnableAspa": str(report.get("routinatorEnableAspa", "")).lower(),
+ "rpkiClientParserWorkers": str(report.get("rpkiClientParserWorkers", "")),
})
env = ET.SubElement(root, "environment")
ET.SubElement(env, "artifactRoot").text = str(path.parent)
@@ -1641,8 +1656,11 @@ def main() -> None:
parser.add_argument("--schedule", default="round-robin", choices=["round-robin", "rp-block"], help="Execution schedule: run-index round-robin or one RP block at a time.")
parser.add_argument("--ours-rsync-scope", default="publication-point", choices=sorted(RPKI_SCOPE_POLICIES))
parser.add_argument("--routinator-enable-aspa", action="store_true", help="Pass --enable-aspa to Routinator so jsonext includes ASPA/VAP data.")
+ parser.add_argument("--rpki-client-parser-workers", type=int, default=0, help="Pass -p N to rpki-client. 0 keeps rpki-client default.")
parser.add_argument("--dry-run", action="store_true")
args = parser.parse_args()
+ if args.rpki_client_parser_workers < 0:
+ raise SystemExit("--rpki-client-parser-workers must be >= 0")
args.run_root = args.run_root.resolve()
args.run_root.mkdir(parents=True, exist_ok=True)
args.active_rps = active_rps(args)
@@ -1659,6 +1677,7 @@ def main() -> None:
"schedule": args.schedule,
"oursRsyncScope": args.ours_rsync_scope,
"routinatorEnableAspa": args.routinator_enable_aspa,
+ "rpkiClientParserWorkers": args.rpki_client_parser_workers,
}
write_json(args.run_root / "dry-run-plan.json", plan)
if args.dry_run: