瀏覽代碼

Add telemetry about the number of processes started in a session

Alessandro Pignotti 1 年之前
父節點
當前提交
9f3308e422
共有 1 個文件被更改,包括 12 次插入0 次删除
  1. 12 0
      index.html

+ 12 - 0
index.html

@@ -294,6 +294,18 @@ __      __   _  __   ____  __
 
 		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("diskActivity", hddCallback);
 			registerNetworkLogin(cx, networkInterface);