Example #1
0
        public void StartTasks()
        {
            try
            {
                Thread[]        threads    = new Thread[_threadCount];
                CacheInitParams parameters = new CacheInitParams();

                _cache = Factory.InitializeCache(_cacheId, parameters);
                _cache.ExceptionsEnabled = true;

                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 e)
            {
                throw e;
            }
        }
Example #2
0
        public void StartTasks()
        {
            try
            {
                Thread[] threads = new Thread[_threadCount];
                _cache = CacheManager.GetCache(_cacheId);

                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;
            }
        }