20260626 优化PP缓存索引与证书缓存长尾

This commit is contained in:
2026-06-26 07:19:11 +08:00
parent af25316d68
commit 9e339e63e7
24 changed files with 3158 additions and 329 deletions

View File

@@ -147,6 +147,22 @@ fn parse_accepts_enable_roa_validation_cache() {
assert!(args.enable_roa_validation_cache);
}
#[test]
fn parse_accepts_enable_child_certificate_validation_cache() {
let argv = vec![
"rpki".to_string(),
"--db".to_string(),
"db".to_string(),
"--tal-path".to_string(),
"x.tal".to_string(),
"--ta-path".to_string(),
"x.cer".to_string(),
"--enable-child-certificate-validation-cache".to_string(),
];
let args = parse_args(&argv).expect("parse args");
assert!(args.enable_child_certificate_validation_cache);
}
#[test]
fn parse_accepts_publication_point_cache_flags() {
let argv = vec![
@@ -194,6 +210,7 @@ fn parse_disables_roa_validation_cache_by_default() {
];
let args = parse_args(&argv).expect("parse args");
assert!(!args.enable_roa_validation_cache);
assert!(!args.enable_child_certificate_validation_cache);
assert!(!args.publication_point_cache_observe_only);
assert!(!args.enable_publication_point_validation_cache);
assert!(!args.enable_transport_request_prefetch);
@@ -1602,6 +1619,7 @@ fn run_report_task_and_stage_timing_work() {
let stage_timing = RunStageTiming {
validation_ms: 1,
enable_roa_validation_cache: false,
enable_child_certificate_validation_cache: false,
publication_point_cache_observe_only: false,
enable_publication_point_validation_cache: false,
enable_transport_request_prefetch: false,
@@ -1628,6 +1646,7 @@ fn run_report_task_and_stage_timing_work() {
analysis_phases: std::collections::HashMap::new(),
analysis_top_publication_points: Vec::new(),
analysis_top_publication_point_steps: Vec::new(),
analysis_top_publication_point_cache_steps: Vec::new(),
vcir_storage_summary_ms: Some(16),
vcir_storage: Some(VcirStorageSummary {
entry_count: 2,
@@ -1706,6 +1725,7 @@ fn stage_timing_serializes_memory_telemetry() {
let stage_timing = RunStageTiming {
validation_ms: 1,
enable_roa_validation_cache: true,
enable_child_certificate_validation_cache: true,
publication_point_cache_observe_only: false,
enable_publication_point_validation_cache: false,
enable_transport_request_prefetch: true,
@@ -1738,6 +1758,7 @@ fn stage_timing_serializes_memory_telemetry() {
analysis_phases: std::collections::HashMap::new(),
analysis_top_publication_points: Vec::new(),
analysis_top_publication_point_steps: Vec::new(),
analysis_top_publication_point_cache_steps: Vec::new(),
vcir_storage_summary_ms: None,
vcir_storage: None,
publication_point_cache_index_load: None,