mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-08-31 01:01:11 +08:00
25 lines
539 B
TypeScript
25 lines
539 B
TypeScript
type DebugInfo = {
|
|
hitCache: number;
|
|
request: number;
|
|
etag: number;
|
|
error: number;
|
|
paths: Record<string, number>;
|
|
routes: Record<string, number>;
|
|
errorPaths: Record<string, number>;
|
|
errorRoutes: Record<string, number>;
|
|
};
|
|
|
|
const debug: DebugInfo = {
|
|
hitCache: 0,
|
|
request: 0,
|
|
etag: 0,
|
|
error: 0,
|
|
routes: {},
|
|
paths: {},
|
|
errorRoutes: {},
|
|
errorPaths: {},
|
|
};
|
|
|
|
export const getDebugInfo = () => debug;
|
|
export const setDebugInfo = (info: typeof debug) => Object.assign(debug, info);
|