示例#1
0
 public TestStressManager(string cacheId, int totalLoopCount, int testCaseIterations, int testCaseIterationDelay, int getsPerIteration, int updatesPerIteration, int dataSize, int expiration, int threadCount, int reportingInterval, bool noLogo, IOutputConsole outputProvider, PowerShellAdapter adapter)
 {
     _cacheId                = cacheId;
     _totalLoopCount         = totalLoopCount;
     _testCaseIterations     = testCaseIterations;
     _testCaseIterationDelay = testCaseIterationDelay;
     _getsPerIteration       = getsPerIteration;
     _updatesPerIteration    = updatesPerIteration;
     _dataSize               = dataSize;
     _expiration             = expiration;
     _threadCount            = threadCount;
     _reportingInterval      = reportingInterval;
     _outputProvider         = outputProvider;
     _adapter                = adapter;
 }
示例#2
0
 /// <summary>
 /// Constructor
 /// </summary>
 public StressThreadTask(ICache cache, int totalLoopCount, int testCaseIterations, int testCaseIterationDelay, int getsPerIteration, int updatesPerIteration, int dataSize, int expiration, int threadCount, int reportingInterval, int threadIndex, IOutputConsole outputProvider, PowerShellAdapter adapter)
 {
     _cache                  = cache;
     _totalLoopCount         = totalLoopCount;
     _testCaseIterations     = testCaseIterations;
     _testCaseIterationDelay = testCaseIterationDelay;
     _getsPerIteration       = getsPerIteration;
     _updatesPerIteration    = updatesPerIteration;
     _dataSize               = dataSize;
     _expiration             = expiration;
     _threadCount            = threadCount;
     _reportingInterval      = reportingInterval;
     _threadIndex            = threadIndex;
     _pid = System.Diagnostics.Process.GetCurrentProcess().Id;
     CreateThread();
     _outputProvider = outputProvider;
     _adapter        = adapter;
 }
示例#3
0
 protected void StartStress()
 {
     try
     {
         adapter       = new PowerShellAdapter(this);
         _taskManger   = new TestStressManager(CacheName, ItemsCount, TestCaseIterations, TestCaseIterationDelay, GetsPerIteration, UpdatesPerIteration, DataSize, SlidingExpiration, ThreadCount, ReportingInterval, Server, printLogo, OutputProvider, adapter);
         _taskInstance = _taskManger;
         _taskManger.StartTasks();
     }
     catch (Exception e)
     {
         if (OutputProvider != null)
         {
             OutputProvider.WriteLine(e.ToString());
             OutputProvider.WriteLine(Environment.NewLine);
         }
     }
 }