Beispiel #1
0
        public void StartTasks()
        {
            try
            {
                Thread[] threads = new Thread[_threadCount];
                CacheConnectionOptions parameters = new CacheConnectionOptions();
                parameters = ToolsUtil.AddServersInCacheConnectionOptions(_servers, parameters);
                _cache     = CacheManager.GetCache(_cacheId, parameters);

                string pid = System.Diagnostics.Process.GetCurrentProcess().Id.ToString();

                for (int threadIndex = 0; threadIndex < _threadCount; threadIndex++)
                {
                    StressThreadTask threadTask = new StressThreadTask(_cache, _totalLoopCount, _testCaseIterations, _testCaseIterationDelay, _getsPerIteration, _updatesPerIteration, _dataSize, _expiration, _threadCount, _reportingInterval, threadIndex, _outputProvider, _adapter);
                    _tasks.Add(threadTask);
                    threadTask.Start();
                }
                _adapter.Listen();
            }
            catch (Exception)
            {
                throw;
            }
        }