Пример #1
0
 public CashlinxLoadThreadController(
     ProgressionRate pRate,
     uint delayUsers,
     uint maxThreads,
     double scale,
     uint numIters,
     LoadTestInputVO input,
     ThreadPriority priority,
     ExecuteFlow scen,
     MsgFunction mFunc,
     StreamWriter fOutput)
 {
     this.rate = pRate;
     this.delayBetweenUsers = delayUsers;
     this.maxNumberThreads  = maxThreads;
     this.threadRateList    = new List <uint>();
     this.threadList        = new List <Thread>();
     this.threadPriority    = priority;
     this.progressionScale  = scale;
     this.numberIterations  = numIters;
     this.flowToExecute     = scen;
     this.threadInput       = input;
     this.msgFunction       = mFunc;
     if (this.progressionScale < 0.0d)
     {
         this.progressionScale *= -1.0d;
     }
     this.genThreadRateList();
     this.prepareThreads();
     this.fullyComplete = false;
     this.curIteration  = 0;
     this.timings       = new Dictionary <int, List <TupleType <int, string, double> > >();
     this.fileOutput    = fOutput;
     this.fileOutput.WriteLine("Iteration,  ThreadID  ,  Area  , Duration (seconds) ");
 }
Пример #2
0
        public int GetStat(CharacterStat stat, ProgressionRate rate, int level)
        {
            BuildLookup();

            if (progressionLookup.ContainsKey(rate.ToString()))
            {
                if (progressionLookup[rate.ToString()].ContainsKey(stat.ToString()))
                {
                    float[] levels = progressionLookup[rate.ToString()][stat.ToString()];
                    if (level > levels.Length - 1)
                    {
                        Debug.LogWarning("Level out of Range");
                        level = (int)levels[levels.Length - 1];
                    }

                    return((int)levels[level]);
                }
                Debug.LogError("Stat Not Found");
                return(0);
            }
            Debug.LogError("Progression Rate Not Found");
            return(0);
        }