Files
lingxi-ai/packages/server/src/controllers/hermes/performance-monitor.ts
T

10 lines
329 B
TypeScript
Raw Normal View History

2026-06-05 11:29:11 +08:00
import { createEmptyOpsRuntimeSnapshot, getOpsRuntimeSnapshot } from '../../services/hermes/ops-monitor'
export async function runtime(ctx: any) {
try {
ctx.body = await getOpsRuntimeSnapshot()
} catch (err: any) {
ctx.body = createEmptyOpsRuntimeSnapshot(err?.message || 'Failed to read performance metrics')
}
}