update modello stats
This commit is contained in:
@@ -27,20 +27,20 @@ namespace WebDoorCreator.SDK
|
||||
internal volatile static Dictionary<string, string> RunningThreadStatus = new Dictionary<string, string>();
|
||||
|
||||
public static ConcurrentQueue<(string, long, long)> RecordList = new ConcurrentQueue<(string, long, long)>();
|
||||
public static ConcurrentDictionary<string, CumSumData> ExeCumSum = new ConcurrentDictionary<string, CumSumData>();
|
||||
public static ConcurrentDictionary<int, CumSumData> ExeCumSum = new ConcurrentDictionary<int, CumSumData>();
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user