所有权指针明确
This commit is contained in:
@@ -83,6 +83,33 @@ BENCHMARK_DEFINE_F(Control_Path, Timestamped_Drag_Admission)(
|
||||
benchmark::DoNotOptimize(result.result);
|
||||
}
|
||||
state.SetItemsProcessed(state.iterations());
|
||||
|
||||
const auto runtime = service->call_tool(
|
||||
"aethera_task_runtime", nlohmann::json::object());
|
||||
if (runtime.result != Tool_Call_Result::ok) {
|
||||
state.SkipWithError("Taskflow runtime diagnostics were rejected");
|
||||
return;
|
||||
}
|
||||
const auto milliseconds = [](const nlohmann::json& value,
|
||||
std::string_view key) {
|
||||
return static_cast<double>(value.at(key).get<std::uint64_t>()) /
|
||||
1'000'000.0;
|
||||
};
|
||||
state.counters["taskflow_wall_ms"] =
|
||||
milliseconds(runtime.content, "observed_wall_time_ns");
|
||||
state.counters["worker_busy_ms"] =
|
||||
milliseconds(runtime.content, "worker_busy_time_ns");
|
||||
state.counters["worker_cpu_ms"] =
|
||||
milliseconds(runtime.content, "worker_cpu_time_ns");
|
||||
state.counters["worker_utilization_pct"] =
|
||||
runtime.content.at("worker_utilization").get<double>();
|
||||
state.counters["worker_cpu_utilization_pct"] =
|
||||
runtime.content.at("worker_cpu_utilization").get<double>();
|
||||
state.counters["active_taskflows"] =
|
||||
static_cast<double>(runtime.content.at("active_taskflows").get<std::size_t>());
|
||||
state.counters["completed_taskflows"] =
|
||||
static_cast<double>(runtime.content.at("completed_taskflows").get<std::size_t>());
|
||||
state.SetLabel(runtime.content.at("longest_task").at("name").get<std::string>());
|
||||
}
|
||||
|
||||
BENCHMARK(decode_timestamped_drag);
|
||||
|
||||
Reference in New Issue
Block a user