diff options
Diffstat (limited to 'src/mcp/tools/get_system_health.c')
| -rw-r--r-- | src/mcp/tools/get_system_health.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/mcp/tools/get_system_health.c b/src/mcp/tools/get_system_health.c index f84511f..893a3b1 100644 --- a/src/mcp/tools/get_system_health.c +++ b/src/mcp/tools/get_system_health.c @@ -35,6 +35,25 @@ call_get_system_health(const mcpc_tool_t *tool, mcpc_ucbr_t *result) tiny_json_u64(&json, health.update_records); tiny_json_raw(&json, ",\"dead_bytes\":"); tiny_json_u64(&json, health.dead_bytes); + tiny_json_raw(&json, ",\"memory_estimate\":{\"total_bytes\":"); + tiny_json_u64(&json, + health.memory_entry_bytes + health.memory_body_bytes + health.memory_metadata_bytes + + tiny_search_index_memory_estimate(context->search_index) + + tiny_history_index_memory_estimate(context->history_index) + + tiny_memory_index_memory_estimate(context->memory_index)); + tiny_json_raw(&json, ",\"store_entries_bytes\":"); + tiny_json_u64(&json, health.memory_entry_bytes); + tiny_json_raw(&json, ",\"body_bytes\":"); + tiny_json_u64(&json, health.memory_body_bytes); + tiny_json_raw(&json, ",\"metadata_bytes\":"); + tiny_json_u64(&json, health.memory_metadata_bytes); + tiny_json_raw(&json, ",\"search_index_bytes\":"); + tiny_json_u64(&json, tiny_search_index_memory_estimate(context->search_index)); + tiny_json_raw(&json, ",\"history_index_bytes\":"); + tiny_json_u64(&json, tiny_history_index_memory_estimate(context->history_index)); + tiny_json_raw(&json, ",\"relation_index_bytes\":"); + tiny_json_u64(&json, tiny_memory_index_memory_estimate(context->memory_index)); + tiny_json_raw(&json, "}"); tiny_json_raw(&json, ",\"io\":{\"write_bytes\":"); tiny_json_u64(&json, health.write_bytes); tiny_json_raw(&json, ",\"write_calls\":"); |
