MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / timeLog

Function timeLog

src/lib/console.js:185–195  ·  view source on GitHub ↗
(label = "default")

Source from the content-addressed store, hash-verified

183 delete timers[label];
184 },
185 timeLog(label = "default") {
186 originalConsole.timeLog(label);
187 if (typeof label !== "string") {
188 throw new TypeError("label must be a string");
189 }
190 if (!timers[label]) {
191 throw new Error(`No such label: ${label}`);
192 }
193 const time = new Date().getTime() - timers[label];
194 log("log", getStack(new Error()), `${label}: ${time}ms`);
195 },
196 trace(...args) {
197 originalConsole.trace(...args);
198 log("trace", getStack(new Error()), ...args);

Callers

nothing calls this directly

Calls 2

getStackFunction · 0.85
logFunction · 0.70

Tested by

no test coverage detected