mirror of
https://github.com/servo/servo
synced 2026-04-25 17:15:48 +02:00
OHOS CI: Fix resident-smaps recording (#42985)
Because of the move of the reporting function to update_user_interface_state and the multiple events of LoadStatus::Complete, the previous reporting did not work correctly anymore. This fixes it by manually summing up the reports for 'resident-according-to-smaps' and using the hitrace-bencher point_filter_type Largest. This should restore the bencher graph. Signed-off-by: Narfinger <Narfinger@users.noreply.github.com> Testing: No automatic test but manual test here: https://github.com/Narfinger/servo/actions/runs/22617931816 Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
This commit is contained in:
@@ -136,10 +136,17 @@ impl PlatformWindow for EmbeddedPlatformWindow {
|
||||
.results
|
||||
.first()
|
||||
.expect("We should have some memory report");
|
||||
for report in &reports.reports {
|
||||
let path = String::from("servo_memory_profiling:") + &report.path.join("/");
|
||||
hitrace::trace_metric_str(&path, report.size as i64);
|
||||
}
|
||||
let search_string = String::from("resident-according-to-smaps");
|
||||
let sum = reports
|
||||
.reports
|
||||
.iter()
|
||||
.filter(|report| report.path.contains(&search_string))
|
||||
.map(|report| report.size)
|
||||
.sum::<usize>();
|
||||
hitrace::trace_metric_str(
|
||||
"servo_memory_profiling:resident-according-to-smaps/sum",
|
||||
sum as i64,
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user