MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / getStats

Method getStats

server/src/health.ts:118–125  ·  view source on GitHub ↗
(agent: Agent)

Source from the content-addressed store, hash-verified

116 }
117
118 async getStats(agent: Agent): Promise<AgentStats> {
119 const cached = this.statsCache.get(agent.url);
120 if (cached) return cached;
121
122 const stats = await this.fetchStats(agent);
123 this.statsCache.set(agent.url, stats);
124 return stats;
125 }
126
127 private async fetchStats(agent: Agent): Promise<AgentStats> {
128 const stats: AgentStats = {};

Callers 8

setupRoutesMethod · 0.45
prewarmCachesMethod · 0.45
getStatusMethod · 0.45
refreshAgentSnapshotsMethod · 0.45

Calls 3

fetchStatsMethod · 0.95
getMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected