Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[adapters] Indicate host ordinal in multihost profiles.
Signed-off-by: Ben Pfaff <blp@feldera.com>
  • Loading branch information
blp committed Mar 24, 2026
commit b5df7a4667b87b647ef148392076c34f4ecbe7a0
8 changes: 6 additions & 2 deletions crates/adapters/src/controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,11 @@ impl Controller {
receiver.await.unwrap()
}

pub async fn async_samply_profile(&self, duration: u64) -> Result<Vec<u8>, AnyError> {
pub async fn async_samply_profile(
&self,
duration: u64,
os_cpu: Option<&str>,
) -> Result<Vec<u8>, AnyError> {
#[cfg(not(unix))]
{
anyhow::bail!(
Expand Down Expand Up @@ -1074,7 +1078,7 @@ impl Controller {
let output = match markers.annotate_profile(
&buf,
self.inner.status.pipeline_config.given_name.as_deref(),
None,
os_cpu,
) {
Ok(output) => output,
Err(error) => {
Expand Down
8 changes: 7 additions & 1 deletion crates/adapters/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1763,8 +1763,14 @@ async fn samply_profile(
.unwrap()
.start_profiling(expected_after);

let layout = controller.layout();
let os_cpu = layout
.is_multihost()
.then(|| format!("host {} of {}", layout.local_host_idx(), layout.n_hosts()));
spawn(async move {
let result = controller.async_samply_profile(duration).await;
let result = controller
.async_samply_profile(duration, os_cpu.as_deref())
.await;
state_samply_state
.lock()
.unwrap()
Expand Down