mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-25 19:21:11 +08:00
test: 新增内存占用基准用例与留存内存采集
bench 每轮采集在 workload 后 promote 根持有/会话引用的 epoch 对象并强制 一次 full GC,新增 peak_bytes / retained_bytes / retained_objects 三口径 (原 session_* 字段为执行期累计分配,不反映 workload 后留存);dispatch 循环增加 session 堆高水位采样,VM 暴露 session_bytes_peak 与 collect_session_gc。新增 8 个 mem_* 压力用例(对象图/字符串/闭包链/数组 增删/跨调用保留/Map/Set 保留/字符串拼接),基线扩至 76 条目。
This commit is contained in:
@@ -79,7 +79,7 @@ pub fn compare_baseline(current: &[MetricCollection]) -> Vec<Regression> {
|
||||
let tolerance = match name {
|
||||
"wall_time_us" => 0.10,
|
||||
"gc_trigger_count" | "gc_bytes_freed" | "gc_objects_scanned" | "gc_collection_us" => 0.50,
|
||||
"session_bytes" => 0.20,
|
||||
"session_bytes" | "peak_bytes" | "retained_bytes" | "retained_objects" => 0.20,
|
||||
_ => 0.20,
|
||||
};
|
||||
let ratio = cur_val / base_val;
|
||||
|
||||
Reference in New Issue
Block a user