MCPcopy Index your code
hub / github.com/Noumena-Network/code / applyDebugLogBudgetAsync

Function applyDebugLogBudgetAsync

src/utils/debug.ts:98–112  ·  view source on GitHub ↗
(
  path: string,
  content: string,
)

Source from the content-addressed store, hash-verified

96}
97
98async function applyDebugLogBudgetAsync(
99 path: string,
100 content: string,
101): Promise<string | null> {
102 const state = getDebugLogBudgetState(path)
103 let existingBytes = state.bytes
104 if (!state.initialized) {
105 try {
106 existingBytes = (await stat(path)).size
107 } catch {
108 existingBytes = 0
109 }
110 }
111 return applyDebugLogBudget(path, content, existingBytes)
112}
113
114function applyDebugLogBudgetSync(path: string, content: string): string | null {
115 const state = getDebugLogBudgetState(path)

Callers 1

appendAsyncFunction · 0.85

Calls 3

getDebugLogBudgetStateFunction · 0.85
statFunction · 0.85
applyDebugLogBudgetFunction · 0.85

Tested by

no test coverage detected