MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / espSampleInstrumentation

Function espSampleInstrumentation

xs/platforms/pico/xsHost.c:319–341  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

317}
318
319void espSampleInstrumentation(modTimer timer, void *refcon, int refconSize)
320{
321 txInteger values[espInstrumentCount];
322 int what;
323 xsMachine *the = *(xsMachine **)refcon;
324
325 for (what = kModInstrumentationPixelsDrawn; what <= kModInstrumentationSystemFreeMemory; what++)
326 values[what - kModInstrumentationPixelsDrawn] = modInstrumentationGet_(the, what);
327
328 if (values[kModInstrumentationTurns - kModInstrumentationPixelsDrawn])
329 values[kModInstrumentationTurns - kModInstrumentationPixelsDrawn] -= 1; // ignore the turn that generates instrumentation
330
331 fxSampleInstrumentation(the, espInstrumentCount, values);
332
333 modInstrumentationSet(PixelsDrawn, 0);
334 modInstrumentationSet(FramesDrawn, 0);
335 modInstrumentationSet(PocoDisplayListUsed, 0);
336 modInstrumentationSet(PiuCommandListUsed, 0);
337 modInstrumentationSet(NetworkBytesRead, 0);
338 modInstrumentationSet(NetworkBytesWritten, 0);
339 modInstrumentationSet(Turns, 0);
340 modInstrumentMachineReset(the);
341}
342
343#endif
344

Callers

nothing calls this directly

Calls 3

modInstrumentationGet_Function · 0.85
fxSampleInstrumentationFunction · 0.85

Tested by

no test coverage detected