Example #1
0
 /// <summary>
 /// Stop Listening to the given BenchmarkSystem
 /// </summary>
 /// <param name="bs">The BenchmarkSystem to stop listening to</param>
 public void Unsubscribe(BenchmarkSystem bs)
 {
     bs.JobSubmitted -= OnJobSubmitted;
     bs.JobCancelled -= OnJobCancelled;
     bs.JobRunning -= OnJobRunning;
     bs.JobTerminated -= OnJobTerminated;
     bs.JobFailed -= OnJobFailed;
 }
Example #2
0
 public static BenchmarkSystem GetBenchmarkSystem()
 {
     if (bs == null)
     {
         bs = new BenchmarkSystem();
     }
     return bs;
 }
Example #3
0
        private static void CreateRandomJobs(BenchmarkSystem bs)
        {
            while (true)
            {
                Job job = CreateRandomJob();
                bs.Submit(job);
                Random rnd = new Random();
                //Sleep between 0 and 5 seconds
                Thread.Sleep((int)(rnd.NextDouble() * 500));

            }
        }