Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

perf(profile): add an embed-fleet density scenario (#7032)

oxoxDev8ddc6c02aa30
diff --git a/crates/openhuman-cli/src/bin/library_profile/harness.rs b/crates/openhuman-cli/src/bin/library_profile/harness.rs
index 08cd8c1c4c..28d25efdec 100644
--- a/crates/openhuman-cli/src/bin/library_profile/harness.rs
+++ b/crates/openhuman-cli/src/bin/library_profile/harness.rs
@@ -103,6 +103,10 @@ pub struct ProfileResult {
/// (`fleet`) marginal RSS cost per agent (`baseline → constructed`), KiB.
#[serde(skip_serializing_if = "Option::is_none")]
pub marginal_rss_kib_per_agent: Option<f64>,
+ /// (`embed-fleet`) marginal RSS per agent once every agent has run its
+ /// turns (`baseline → loaded`), KiB.
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub loaded_marginal_rss_kib_per_agent: Option<f64>,
/// (`fleet`) user+system CPU delta over the 10 s idle window, ms.
#[serde(skip_serializing_if = "Option::is_none")]
pub idle_cpu_ms: Option<u64>,
@@ -478,6 +482,7 @@ where
agents: None,
agents_built: None,
marginal_rss_kib_per_agent: None,
+ loaded_marginal_rss_kib_per_agent: None,
idle_cpu_ms: None,
turn_latency_ms: None,
budget: None,
diff --git a/crates/openhuman-cli/src/bin/library_profile/main.rs b/crates/openhuman-cli/src/bin/library_profile/main.rs
index edc37ab526..a5fdfb7a63 100644
--- a/crates/openhuman-cli/src/bin/library_profile/main.rs
+++ b/crates/openhuman-cli/src/bin/library_profile/main.rs
@@ -9,6 +9,7 @@
//! - `long-agent` — N warmed sequential turns with a per-turn checkpoint series.
//! - `workflow` — a real flows trigger->transform->agent graph, end to end.
//! - `fleet` — N live agents: marginal RSS, idle CPU, fd/thread growth, turn latency.
+//! - `embed-fleet` — the same questions for N distinct agents on one `openhuman_embed::Runtime`.
//! - `skill-run` — a skill step executing on a real `node` child: process-tree RSS.
//! - `subagent-storm`— K parallel `agent_memory` subagents in one instance: marginal RSS per subagent.
//!
@@ -57,6 +58,7 @@ async fn dispatch(scenario: &str) -> Result<ProfileResult> {
"long-agent" => scenarios::long_agent::run().await,
"workflow" => scenarios::workflow::run().await,
"fleet" => scenarios::fleet::run().await,
+ "embed-fleet" => scenarios::embed_fleet::run().await,
"skill-run" => scenarios::skill_run::run().await,
"subagent-storm" => scenarios::subagent_storm::run().await,
other => anyhow::bail!("unknown scenario: {other}"),
@@ -66,9 +68,14 @@ async fn dispatch(scenario: &str) -> Result<ProfileResult> {
/// Build the tokio runtime. When `OPENHUMAN_PROFILE_WORKER_THREADS` is set the
/// multi-thread runtime is built manually with that worker count (set to `2` to
/// simulate the 2 vCPU box); otherwise the standard multi-thread default runs.
-fn build_runtime() -> Result<tokio::runtime::Runtime> {
+fn build_runtime(scenario: &str) -> Result<tokio::runtime::Runtime> {
let mut builder = tokio::runtime::Builder::new_multi_thread();
builder.enable_all();
+ if scenario == "embed-fleet" {
+ builder
+ .thread_stack_size(openhuman_core::core::runtime::AGENT_WORKER_STACK_BYTES)
+ .max_blocking_threads(openhuman_core::core::runtime::MAX_BLOCKING_THREADS);
+ }
if let Some(workers) = std::env::var("OPENHUMAN_PROFILE_WORKER_THREADS")
.ok()
.and_then(|value| value.parse::<usize>().ok())
@@ -85,7 +92,7 @@ fn main() -> Result<()> {
// can size the worker pool (the `fleet` scenario simulates the 2 vCPU box).
let scenario = std::env::args().nth(1).context(
"usage: library-profile \
- <agent-turn|long-agent|workflow|fleet|skill-run|subagent-storm>",
+ <agent-turn|long-agent|workflow|fleet|embed-fleet|skill-run|subagent-storm>",
)?;
// Profiler must outlive the whole run + the JSON print so its Drop writes
@@ -98,7 +105,7 @@ fn main() -> Result<()> {
std::process::id()
);
- let runtime = build_runtime()?;
+ let runtime = build_runtime(&scenario)?;
runtime.block_on(async move {
#[cfg_attr(not(feature = "rss-bench-dhat"), allow(unused_mut))]
let mut result = dispatch(&scenario).await?;
diff --git a/crates/openhuman-cli/src/bin/library_profile/scenarios/embed_fleet.rs b/crates/openhuman-cli/src/bin/library_profile/scenarios/embed_fleet.rs
new file mode 100644
index 0000000000..b698078910
--- /dev/null
+++ b/crates/openhuman-cli/src/bin/library_profile/scenarios/embed_fleet.rs
@@ -0,0 +1,226 @@
+//! `embed-fleet`: N distinct agents on one `openhuman_embed::Runtime`.
+//!
+//! The `fleet` scenario measures N copies of one session host under one agent
+//! id. This one measures what a library host actually runs: one runtime, then
+//! `Runtime::agent` per tenant, each with its own id, home and context, and
+//! each driving its own turns through `Agent::turn`.
+//!
+//! Reported on top of the shared `fleet` fields:
+//! - `marginal_rss_kib_per_agent`: `baseline → constructed`, the standing cost
+//! of an idle agent.
+//! - `loaded_marginal_rss_kib_per_agent`: `baseline → loaded`, after every
+//! agent has run its turns.
+//!
+//! Env knobs are the `fleet` ones (`OPENHUMAN_PROFILE_AGENTS`, `_TURNS`,
+//! `_MOCK_LATENCY_MS`, `_TARGET_AGENTS`, `_RAM_BUDGET_MIB`).
+
+use std::sync::{Arc, Mutex};
+use std::time::{Duration, Instant};
+
+use anyhow::{Context, Result};
+use openhuman_core::inference::provider::factory::test_provider_override;
+use openhuman_core::platform::proc_metrics;
+use openhuman_tinyhumans::embed::{Access, Agent, AgentSpec, Provider, Runtime, Workspace};
+
+use super::fleet::{env_u64, env_usize, latency_summary, raise_fd_limit};
+use crate::harness::{fixture, measure, FleetBudget, ProfileResult, Recorder};
+use crate::mock::LatencyMock;
+
+const DEFAULT_AGENTS: usize = 100;
+const DEFAULT_TURNS: usize = 3;
+const DEFAULT_TARGET_AGENTS: u64 = 1000;
+const DEFAULT_RAM_BUDGET_MIB: u64 = 2048;
+const IDLE_WINDOW: Duration = Duration::from_secs(10);
+/// A routed provider keeps the turn off the managed backend; the installed
+/// mock model answers before any request is sent.
+const MOCK_ROUTE: &str = "http://127.0.0.1:9/v1";
+
+/// The id of the `index`th fleet agent.
+fn agent_id(index: usize) -> String {
+ format!("agent-{index}")
+}
+
+#[derive(Default)]
+struct EmbedFleetMetrics {
+ agents_built: usize,
+ baseline_rss_kib: u64,
+ constructed_rss_kib: u64,
+ loaded_rss_kib: u64,
+ idle_cpu_ms: u64,
+ latency_ms: Vec<u128>,
+}
+
+fn build_agents(runtime: &Runtime, n: usize, rec: &Recorder) -> Result<Vec<Agent>> {
+ let stride = (n / 10).max(1);
+ let mut agents = Vec::with_capacity(n);
+ for index in 0..n {
+ match runtime.agent(AgentSpec::new(agent_id(index)).access(Access::readonly())) {
+ Ok(agent) => agents.push(agent),
+ Err(err) => {
+ eprintln!(
+ "[library-profile] embed-fleet: construction failed at agent {} — {err}",
+ index + 1
+ );
+ rec.checkpoint(format!("construction-failed-{}", agents.len()))?;
+ break;
+ }
+ }
+ let built = index + 1;
+ if built % stride == 0 || built == n {
+ rec.checkpoint(format!("built-{built}"))?;
+ }
+ }
+ Ok(agents)
+}
+
+async fn drive(agents: &[Agent], turns: usize) -> Vec<u128> {
+ let mut handles = Vec::with_capacity(agents.len());
+ for (index, agent) in agents.iter().cloned().enumerate() {
+ let stagger = Duration::from_millis(((index as u64) * 10).min(2000));
+ handles.push(tokio::spawn(async move {
+ tokio::time::sleep(stagger).await;
+ let session = format!("fleet-{}", agent.id());
+ let mut latencies = Vec::with_capacity(turns);
+ for _ in 0..turns {
+ let started = Instant::now();
+ let outcome = agent
+ .turn("Give me a one-line status update.")
+ .session(&session)
+ .send()
+ .await;
+ let elapsed = started.elapsed().as_millis();
+ match outcome {
+ Ok(outcome) if !outcome.reply.trim().is_empty() => latencies.push(elapsed),
+ Ok(_) => eprintln!(
+ "[library-profile] embed-fleet: empty reply agent={}",
+ agent.id()
+ ),
+ Err(err) => eprintln!(
+ "[library-profile] embed-fleet: turn error agent={} — {err}",
+ agent.id()
+ ),
+ }
+ }
+ latencies
+ }));
+ }
+ let mut all = Vec::new();
+ for handle in handles {
+ match handle.await {
+ Ok(mut latencies) => all.append(&mut latencies),
+ Err(err) => eprintln!("[library-profile] embed-fleet: task join error — {err}"),
+ }
+ }
+ all
+}
+
+fn per_agent(from_kib: u64, to_kib: u64, agents: usize) -> Option<f64> {
+ (agents > 0).then(|| (to_kib as f64 - from_kib as f64) / agents as f64)
+}
+
+pub async fn run() -> Result<ProfileResult> {
+ let agents_requested = env_usize("OPENHUMAN_PROFILE_AGENTS", DEFAULT_AGENTS);
+ let turns = env_usize("OPENHUMAN_PROFILE_TURNS", DEFAULT_TURNS);
+ let target_agents = env_u64("OPENHUMAN_PROFILE_TARGET_AGENTS", DEFAULT_TARGET_AGENTS);
+ let ram_budget_mib = env_u64("OPENHUMAN_PROFILE_RAM_BUDGET_MIB", DEFAULT_RAM_BUDGET_MIB);
+
+ raise_fd_limit();
+
+ let fixture = fixture()?;
+ let mock = LatencyMock::from_env("Fleet agent: nothing needs your attention.");
+ let _provider = test_provider_override::install_model(mock.clone());
+ let runtime = Arc::new(
+ Runtime::builder()
+ .config(fixture.config.clone())
+ .workspace(Workspace::Ephemeral)
+ .provider(Provider::openai_compatible(MOCK_ROUTE, "sk-profile").model("profile-mock"))
+ .build()
+ .await
+ .context("build the embed runtime")?,
+ );
+ eprintln!(
+ "[library-profile] embed-fleet: agents={agents_requested} turns={turns} \
+ target={target_agents} budget_mib={ram_budget_mib}"
+ );
+
+ let metrics = Arc::new(Mutex::new(EmbedFleetMetrics::default()));
+ let metrics_for_workload = Arc::clone(&metrics);
+ let runtime_for_workload = Arc::clone(&runtime);
+
+ let mut result = measure(
+ "embed-fleet",
+ agents_requested,
+ Some(turns),
+ move |rec| async move {
+ rec.checkpoint("baseline")?;
+ let baseline_rss = proc_metrics::sample_self()?.rss_kib;
+
+ let agents = build_agents(&runtime_for_workload, agents_requested, &rec)?;
+ rec.checkpoint("constructed")?;
+ let constructed_rss = proc_metrics::sample_self()?.rss_kib;
+ eprintln!(
+ "[library-profile] embed-fleet: built {}/{agents_requested} agents; \
+ baseline_rss={baseline_rss} constructed_rss={constructed_rss}",
+ agents.len()
+ );
+
+ rec.checkpoint("idle-start")?;
+ let idle_start = proc_metrics::sample_self()?;
+ tokio::time::sleep(IDLE_WINDOW).await;
+ rec.checkpoint("idle-end")?;
+ let idle_end = proc_metrics::sample_self()?;
+ let idle_cpu_ms = (idle_end.cpu_user_ms + idle_end.cpu_system_ms)
+ .saturating_sub(idle_start.cpu_user_ms + idle_start.cpu_system_ms);
+
+ let latencies = drive(&agents, turns).await;
+ tokio::time::sleep(Duration::from_millis(500)).await;
+ rec.checkpoint("loaded")?;
+ let loaded_rss = proc_metrics::sample_self()?.rss_kib;
+
+ let mut m = metrics_for_workload.lock().expect("metrics lock");
+ m.agents_built = agents.len();
+ m.baseline_rss_kib = baseline_rss;
+ m.constructed_rss_kib = constructed_rss;
+ m.loaded_rss_kib = loaded_rss;
+ m.idle_cpu_ms = idle_cpu_ms;
+ m.latency_ms = latencies;
+ drop(m);
+ drop(agents);
+ Ok(())
+ },
+ )
+ .await?;
+
+ let metrics = Arc::try_unwrap(metrics)
+ .map(|m| m.into_inner().expect("metrics lock"))
+ .unwrap_or_default();
+ let agents_built = metrics.agents_built;
+ let marginal = per_agent(
+ metrics.baseline_rss_kib,
+ metrics.constructed_rss_kib,
+ agents_built,
+ );
+ let loaded = per_agent(
+ metrics.baseline_rss_kib,
+ metrics.loaded_rss_kib,
+ agents_built,
+ );
+ let base_mib = metrics.baseline_rss_kib as f64 / 1024.0;
+ let marginal_mib = loaded.or(marginal).unwrap_or(0.0) / 1024.0;
+ let projected = base_mib + marginal_mib * target_agents as f64;
+
+ result.agents = Some(agents_requested);
+ result.agents_built = Some(agents_built);
+ result.marginal_rss_kib_per_agent = marginal;
+ result.loaded_marginal_rss_kib_per_agent = loaded;
+ result.idle_cpu_ms = Some(metrics.idle_cpu_ms);
+ result.turn_latency_ms = latency_summary(metrics.latency_ms);
+ result.budget = Some(FleetBudget {
+ target_agents,
+ ram_budget_mib,
+ projected_rss_mib_at_target: projected,
+ fits: projected <= ram_budget_mib as f64,
+ });
+ drop(runtime);
+ Ok(result)
+}
diff --git a/crates/openhuman-cli/src/bin/library_profile/scenarios/fleet.rs b/crates/openhuman-cli/src/bin/library_profile/scenarios/fleet.rs
index 63ed475285..55f63684d6 100644
--- a/crates/openhuman-cli/src/bin/library_profile/scenarios/fleet.rs
+++ b/crates/openhuman-cli/src/bin/library_profile/scenarios/fleet.rs
@@ -34,7 +34,7 @@ const DEFAULT_RAM_BUDGET_MIB: u64 = 2048;
const IDLE_WINDOW: Duration = Duration::from_secs(10);
const FLEET_AGENT_ID: &str = "orchestrator";
-fn env_usize(key: &str, default: usize) -> usize {
+pub(super) fn env_usize(key: &str, default: usize) -> usize {
std::env::var(key)
.ok()
.and_then(|v| v.parse::<usize>().ok())
@@ -42,7 +42,7 @@ fn env_usize(key: &str, default: usize) -> usize {
.unwrap_or(default)
}
-fn env_u64(key: &str, default: u64) -> u64 {
+pub(super) fn env_u64(key: &str, default: u64) -> u64 {
std::env::var(key)
.ok()
.and_then(|v| v.parse::<u64>().ok())
@@ -52,7 +52,7 @@ fn env_u64(key: &str, default: u64) -> u64 {
/// Raise `RLIMIT_NOFILE` toward its hard cap so N agents (each opening SQLite
/// etc.) don't exhaust the default macOS 256 soft limit. Logs old/new to stderr.
-fn raise_fd_limit() {
+pub(super) fn raise_fd_limit() {
use std::mem::MaybeUninit;
let mut lim = MaybeUninit::<libc::rlimit>::uninit();
// SAFETY: `getrlimit` initialises `lim` on success.
@@ -83,7 +83,7 @@ struct FleetMetrics {
}
/// Percentile (nearest-rank) of an already-sorted slice. `p` in `[0,100]`.
-fn percentile(sorted: &[u128], p: u128) -> u128 {
+pub(super) fn percentile(sorted: &[u128], p: u128) -> u128 {
if sorted.is_empty() {
return 0;
}
@@ -92,7 +92,7 @@ fn percentile(sorted: &[u128], p: u128) -> u128 {
sorted[idx]
}
-fn latency_summary(mut samples: Vec<u128>) -> Option<TurnLatency> {
+pub(super) fn latency_summary(mut samples: Vec<u128>) -> Option<TurnLatency> {
if samples.is_empty() {
return None;
}
diff --git a/crates/openhuman-cli/src/bin/library_profile/scenarios/mod.rs b/crates/openhuman-cli/src/bin/library_profile/scenarios/mod.rs
index 922f15e061..6e23e86a80 100644
--- a/crates/openhuman-cli/src/bin/library_profile/scenarios/mod.rs
+++ b/crates/openhuman-cli/src/bin/library_profile/scenarios/mod.rs
@@ -10,6 +10,7 @@
//! rather than a revived file.
pub mod agent_turn;
+pub mod embed_fleet;
pub mod fleet;
pub mod long_agent;
pub mod skill_run;
diff --git a/scripts/profile/library-fleet.sh b/scripts/profile/library-fleet.sh
index 4f8221f15a..2a3a1364e8 100755
--- a/scripts/profile/library-fleet.sh
+++ b/scripts/profile/library-fleet.sh
@@ -19,6 +19,8 @@
# --budget-mib N OPENHUMAN_PROFILE_RAM_BUDGET_MIB (default: 2048)
# --skip-build Reuse the existing target/release binaries
# --slim Build with --no-default-features (slim library recipe)
+# --embed Run `embed-fleet`: N distinct agents on one
+# openhuman_embed::Runtime instead of N session hosts
# --out DIR Output directory (default: target/profile/rust-library/fleet-<timestamp>)
# --no-gate Do not fail the exit code on fits==false (report only)
# -h, --help Show this help
@@ -27,6 +29,7 @@
# ./scripts/profile/library-fleet.sh
# ./scripts/profile/library-fleet.sh --agents 100 --latency-ms 200
# ./scripts/profile/library-fleet.sh --agents "100,1000" --target 1000 --budget-mib 2048
+# ./scripts/profile/library-fleet.sh --embed --agents 500 --repeat 1
set -euo pipefail
@@ -42,6 +45,7 @@ TARGET=1000
BUDGET_MIB=2048
SKIP_BUILD=0
SLIM=0
+SCENARIO="fleet"
OUT_DIR=""
GATE=1
@@ -52,7 +56,7 @@ GATE=1
IDLE_CPU_MS_MAX=500
usage() {
- sed -n '2,27p' "${BASH_SOURCE[0]}" | sed 's/^# \{0,1\}//'
+ sed -n '2,32p' "${BASH_SOURCE[0]}" | sed 's/^# \{0,1\}//'
exit "${1:-0}"
}
@@ -74,6 +78,7 @@ while [[ $# -gt 0 ]]; do
BUDGET_MIB="${2:?--budget-mib requires a value}"; shift 2 ;;
--skip-build) SKIP_BUILD=1; shift ;;
--slim) SLIM=1; shift ;;
+ --embed) SCENARIO="embed-fleet"; shift ;;
--out)
OUT_DIR="${2:?--out requires a value}"; shift 2 ;;
--no-gate) GATE=0; shift ;;
@@ -90,7 +95,7 @@ if ! command -v jq >/dev/null 2>&1; then
fi
if [[ -z "$OUT_DIR" ]]; then
- OUT_DIR="$REPO_ROOT/target/profile/rust-library/fleet-$(date +%Y%m%d-%H%M%S)"
+ OUT_DIR="$REPO_ROOT/target/profile/rust-library/$SCENARIO-$(date +%Y%m%d-%H%M%S)"
fi
mkdir -p "$OUT_DIR"
@@ -123,7 +128,7 @@ run_sweep_point() {
local point_dir="$OUT_DIR/fleet-$n"
mkdir -p "$point_dir"
- log "running fleet scenario with $n agents x$REPEAT (fresh process each run)"
+ log "running $SCENARIO scenario with $n agents x$REPEAT (fresh process each run)"
local i
for ((i = 1; i <= REPEAT; i++)); do
@@ -136,7 +141,7 @@ run_sweep_point() {
"OPENHUMAN_PROFILE_WORKER_THREADS=$WORKERS" \
"OPENHUMAN_PROFILE_TARGET_AGENTS=$TARGET" \
"OPENHUMAN_PROFILE_RAM_BUDGET_MIB=$BUDGET_MIB" \
- "$BIN" fleet >"$run_file"
+ "$BIN" "$SCENARIO" >"$run_file"
if ! jq empty "$run_file" >/dev/null 2>&1; then
echo "ERROR: run $i for agents=$n did not produce valid JSON: $run_file" >&2
@@ -188,8 +193,9 @@ aggregate_point() {
local n="$1"
local point_dir="$OUT_DIR/fleet-$n"
- local marginal settled_rss idle_cpu threads open_fds p50 p95 p99 projected fits
+ local marginal loaded settled_rss idle_cpu threads open_fds p50 p95 p99 projected fits
marginal=$(aggregate_field "$point_dir" ".marginal_rss_kib_per_agent")
+ loaded=$(aggregate_field "$point_dir" ".loaded_marginal_rss_kib_per_agent")
settled_rss=$(aggregate_field "$point_dir" ".settled.rss_kib")
idle_cpu=$(aggregate_field "$point_dir" ".idle_cpu_ms")
threads=$(aggregate_field "$point_dir" ".settled.threads")
@@ -203,6 +209,7 @@ aggregate_point() {
jq -n \
--argjson agents "$n" \
--argjson marginal_rss_kib_per_agent "$marginal" \
+ --argjson loaded_marginal_rss_kib_per_agent "$loaded" \
--argjson settled_rss_kib "$settled_rss" \
--argjson idle_cpu_ms "$idle_cpu" \
--argjson threads "$threads" \
@@ -215,6 +222,7 @@ aggregate_point() {
'{
agents: $agents,
marginal_rss_kib_per_agent: $marginal_rss_kib_per_agent,
+ loaded_marginal_rss_kib_per_agent: $loaded_marginal_rss_kib_per_agent,
settled_rss_kib: $settled_rss_kib,
idle_cpu_ms: $idle_cpu_ms,
threads: $threads,
@@ -252,9 +260,11 @@ write_summary() {
--argjson target "$TARGET" \
--argjson budget_mib "$BUDGET_MIB" \
--arg build "$([[ "$SLIM" -eq 1 ]] && echo "slim" || echo "default")" \
+ --arg scenario "$SCENARIO" \
'{
generated_at: (now | todate),
build: $build,
+ scenario: $scenario,
config: {
turns: $turns,
mock_latency_ms: $latency_ms,
@@ -272,20 +282,21 @@ write_summary() {
{
echo "# Fleet benchmark summary"
echo
- echo "Build: \`$([[ "$SLIM" -eq 1 ]] && echo "slim" || echo "default")\` "
+ echo "Build: \`$([[ "$SLIM" -eq 1 ]] && echo "slim" || echo "default")\`, scenario: \`$SCENARIO\` "
echo "Repeats per agent count: ${REPEAT} "
echo "Turns/agent: ${TURNS}, mock latency: ${LATENCY_MS}ms, worker threads: ${WORKERS} "
echo "Target: ${TARGET} agents, budget: ${BUDGET_MIB} MiB "
echo "Generated: $(date)"
echo
- echo "| N | marginal KiB/agent | settled MiB | idle CPU ms/10s | threads | fds | p95 ms | projected MiB @ target | fits |"
- echo "| ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | :---: |"
+ echo "| N | marginal KiB/agent | loaded KiB/agent | settled MiB | idle CPU ms/10s | threads | fds | p95 ms | projected MiB @ target | fits |"
+ echo "| ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | :---: |"
local f
for f in "$OUT_DIR"/*.point.json; do
- local n marginal settled idle threads fds p95 projected fits_all
+ local n marginal loaded settled idle threads fds p95 projected fits_all
n=$(jq -r '.agents' "$f")
marginal=$(num_or_na "$(jq -r '.marginal_rss_kib_per_agent.median' "$f")")
+ loaded=$(num_or_na "$(jq -r '.loaded_marginal_rss_kib_per_agent.median' "$f")")
settled=$(kib_to_mib "$(jq -r '.settled_rss_kib.median' "$f")")
idle=$(num_or_na "$(jq -r '.idle_cpu_ms.median' "$f")")
threads=$(num_or_na "$(jq -r '.threads.median' "$f")")
@@ -293,7 +304,7 @@ write_summary() {
p95=$(num_or_na "$(jq -r '.turn_latency_ms.p95.median' "$f")")
projected=$(num_or_na "$(jq -r '.projected_rss_mib_at_target.median' "$f")")
fits_all=$(jq -r '.fits.all_fit' "$f")
- echo "| $n | $marginal | $settled | $idle | $threads | $fds | $p95 | $projected | $fits_all |"
+ echo "| $n | $marginal | $loaded | $settled | $idle | $threads | $fds | $p95 | $projected | $fits_all |"
done
echo