feat(rust): expose profiler control routes in Rust frontend (#46306)

Co-authored-by: Bugen Zhao <i@bugenzhao.com>
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
This commit is contained in:
Pranav Thakur
2026-07-02 08:46:07 +00:00
committed by GitHub
co-authored by Bugen Zhao
parent b0b8a286dd
commit 08a8a4af3f
11 changed files with 381 additions and 2 deletions
+12
View File
@@ -738,6 +738,18 @@ impl EngineCoreClient {
self.call_utility_consensus("is_scheduler_paused", ()).await
}
/// Start profiling the engine.
pub async fn start_profile(&self, profile_prefix: Option<&str>) -> Result<()> {
self.call_utility::<(), _>("profile", (true, profile_prefix)).await?;
Ok(())
}
/// Stop profiling the engine.
pub async fn stop_profile(&self, profile_prefix: Option<&str>) -> Result<()> {
self.call_utility::<(), _>("profile", (false, profile_prefix)).await?;
Ok(())
}
/// Shut down local client tasks and close transport state.
pub async fn shutdown(self) -> Result<()> {
let Self {