From 06e8f910d88dc68fe5d84cd563e2a5e5c0f48bb9 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 15 May 2023 09:53:45 +0200 Subject: [PATCH] update modello stats --- WebDoorCreator.SDK/ProcStats.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/WebDoorCreator.SDK/ProcStats.cs b/WebDoorCreator.SDK/ProcStats.cs index 6a3e709..23f7689 100644 --- a/WebDoorCreator.SDK/ProcStats.cs +++ b/WebDoorCreator.SDK/ProcStats.cs @@ -27,20 +27,20 @@ namespace WebDoorCreator.SDK internal volatile static Dictionary RunningThreadStatus = new Dictionary(); public static ConcurrentQueue<(string, long, long)> RecordList = new ConcurrentQueue<(string, long, long)>(); - public static ConcurrentDictionary ExeCumSum = new ConcurrentDictionary(); + public static ConcurrentDictionary ExeCumSum = new ConcurrentDictionary(); - public static bool RecordData(string nameRef, long exeTime, long othTime) + public static bool RecordData(int numThread , long exeTime, long othTime) { bool fatto = false; - if (ExeCumSum.ContainsKey(nameRef)) + if (ExeCumSum.ContainsKey(numThread)) { - ExeCumSum[nameRef].NumRec++; - ExeCumSum[nameRef].ExeTime += exeTime; - ExeCumSum[nameRef].OthTime += othTime; + ExeCumSum[numThread].NumRec++; + ExeCumSum[numThread].ExeTime += exeTime; + ExeCumSum[numThread].OthTime += othTime; } else { - ExeCumSum.TryAdd(nameRef, new CumSumData(1, exeTime, othTime)); + ExeCumSum.TryAdd(numThread, new CumSumData(1, exeTime, othTime)); } return fatto; }