20260618 增加PP缓存命中路径性能埋点
This commit is contained in:
@@ -2008,6 +2008,33 @@ fn runner_publication_point_cache_reuses_projection_outputs_children_and_ccr() {
|
||||
.copied(),
|
||||
Some(1)
|
||||
);
|
||||
assert_eq!(
|
||||
counts
|
||||
.get("publication_point_cache_related_objects_reused")
|
||||
.copied(),
|
||||
Some(vcir.related_artifacts.len() as u64)
|
||||
);
|
||||
assert_eq!(
|
||||
counts
|
||||
.get("publication_point_cache_audit_objects_reused")
|
||||
.copied(),
|
||||
Some(result.cir_cached_objects.len() as u64)
|
||||
);
|
||||
let timing_dir = tempfile::tempdir().expect("timing dir");
|
||||
let timing_path = timing_dir.path().join("timing.json");
|
||||
timing.write_json(&timing_path, 20).expect("write timing");
|
||||
let timing_json: serde_json::Value =
|
||||
serde_json::from_slice(&std::fs::read(&timing_path).expect("read timing"))
|
||||
.expect("parse timing");
|
||||
let phase_keys = timing_json["phases"]
|
||||
.as_object()
|
||||
.expect("phases")
|
||||
.keys()
|
||||
.map(|key| key.as_str())
|
||||
.collect::<std::collections::HashSet<_>>();
|
||||
assert!(phase_keys.contains("publication_point_cache_lookup_hit_total"));
|
||||
assert!(phase_keys.contains("publication_point_cache_reuse_build_total"));
|
||||
assert!(phase_keys.contains("publication_point_cache_build_objects_total"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user