Add telemetry about the number of processes started in a session

This commit is contained in:
Alessandro Pignotti 2024-07-04 16:53:50 +02:00
parent 9b07e72065
commit 9f3308e422

View file

@ -294,6 +294,18 @@ __ __ _ __ ____ __
async function runTest(cx) async function runTest(cx)
{ {
var processCount = 0;
function handleProcessCreated()
{
processCount++;
plausible(`Process started: ${processCount}`);
if(processCount == 5)
{
// Make sure no further event is reported
cx.unregisterCallback("processCreated", handleProcessCreated);
}
}
cx.registerCallback("processCreated", handleProcessCreated);
cx.registerCallback("cpuActivity", cpuCallback); cx.registerCallback("cpuActivity", cpuCallback);
cx.registerCallback("diskActivity", hddCallback); cx.registerCallback("diskActivity", hddCallback);
registerNetworkLogin(cx, networkInterface); registerNetworkLogin(cx, networkInterface);