pub struct ExternalMetricsOutput {
pub framework: String,
pub cold_start_us: u64,
pub first_llm_call_epoch_ns: u64,
pub loop_overhead: ExternalDurationStats,
pub peak_rss_bytes: Option<u64>,
pub throughput_agents_per_sec: Option<f64>,
pub token_overhead: Option<ExternalTokenOverhead>,
}Expand description
External Benchmark Protocol (EBP) — the JSON schema that all external framework benchmark scripts MUST emit on stdout.
This is the contract between adk-bench and any competitor framework harness.
External scripts receive: the workload JSON path as last CLI arg, and
BENCH_START_EPOCH_NS in their environment (monotonic nanosecond timestamp
at subprocess spawn time).
They MUST output exactly one JSON object (no other stdout content):
{
"framework": "langgraph",
"cold_start_us": 45000,
"first_llm_call_epoch_ns": 1705312800000045000,
"loop_overhead": {
"min_us": 120, "max_us": 890, "mean_us": 340,
"median_us": 310, "p95_us": 780, "p99_us": 870, "count": 10
},
"throughput_agents_per_sec": 12.5,
"peak_rss_bytes": 52428800,
"token_overhead": {
"total_tokens": 1200, "user_content_tokens": 950, "overhead_tokens": 250
}
}Fields§
§framework: StringFramework name (e.g., “adk-python”, “langgraph”, “crewai”).
cold_start_us: u64Cold start time in microseconds (subprocess spawn → first LLM call).
first_llm_call_epoch_ns: u64Monotonic nanosecond timestamp when the first LLM call was made.
Used with BENCH_START_EPOCH_NS to compute cold start from the external clock.
loop_overhead: ExternalDurationStatsPer-turn framework overhead statistics (LLM time subtracted).
peak_rss_bytes: Option<u64>Peak RSS in bytes (null if platform doesn’t support measurement).
throughput_agents_per_sec: Option<f64>Agents completed per second at the requested concurrency (null if not measured).
token_overhead: Option<ExternalTokenOverhead>Token overhead breakdown (null if not measured).
Trait Implementations§
Source§impl Clone for ExternalMetricsOutput
impl Clone for ExternalMetricsOutput
Source§fn clone(&self) -> ExternalMetricsOutput
fn clone(&self) -> ExternalMetricsOutput
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ExternalMetricsOutput
impl Debug for ExternalMetricsOutput
Source§impl<'de> Deserialize<'de> for ExternalMetricsOutput
impl<'de> Deserialize<'de> for ExternalMetricsOutput
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for ExternalMetricsOutput
impl PartialEq for ExternalMetricsOutput
Source§fn eq(&self, other: &ExternalMetricsOutput) -> bool
fn eq(&self, other: &ExternalMetricsOutput) -> bool
self and other values to be equal, and is used by ==.