Files
Hermes-ui/packages/server/src/controllers/hermes/performance-monitor.ts
T

10 lines
329 B
TypeScript
Raw Normal View History

2026-05-23 09:05:03 +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')
}
}