MCPcopy Create free account
hub / github.com/cloudflare/computer / trackStub

Function trackStub

packages/rpc/src/debug.ts:39–43  ·  view source on GitHub ↗
(target: object)

Source from the content-addressed store, hash-verified

37const counters = new Map<string, number>();
38
39export function trackStub(target: object): void {
40 if (!trackingEnabled) return;
41 const name = target.constructor?.name ?? "anonymous";
42 counters.set(name, (counters.get(name) ?? 0) + 1);
43}
44
45export function untrackStub(target: object): void {
46 if (!trackingEnabled) return;

Callers 10

constructorMethod · 0.90
constructorMethod · 0.90
constructorMethod · 0.90
constructorMethod · 0.90
constructorMethod · 0.90
constructorMethod · 0.90
constructorMethod · 0.90
constructorMethod · 0.85
constructorMethod · 0.85
constructorMethod · 0.85

Calls 2

setMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected