Exemplo n.º 1
0
        /// <summary>
        /// Constructor
        /// Creates subscriptions to the BenchmarkSystem EventHandlers
        /// </summary>
        /// <param name="benchmark">The Benchmark containing this Logger</param>
        public Logger(BenchmarkSystem benchmark)
        {
            Contract.Requires(benchmark != null);

            benchmark.JobSubmitted += OnJobSubmitted;
            benchmark.JobCancelled += OnJobCancelled;
            benchmark.JobRunning += OnJobRunning;
            benchmark.JobTerminated += OnJobTerminated;
            benchmark.JobFailed += OnJobFailed;
            benchmark.JobDone += OnJobDone;
        }
Exemplo n.º 2
0
 /// <summary>
 /// The constructor
 /// </summary>
 public ConsoleUI()
 {
     _benchmark = new BenchmarkSystem();
     Launch();
 }
Exemplo n.º 3
0
 /// <summary>
 /// Helper method. Checks that the sequence of jobs returned is in the same order as they were added
 /// </summary>
 /// <param name="s">The scheduler</param>
 /// <param name="first">Job to add first</param>
 /// <param name="second">Job to add second</param>
 /// <param name="third">Job to add last</param>
 private void AssertSequence(BenchmarkSystem.Scheduler s, Job first, Job second, Job third)
 {
     s.AddJob(first);
     s.AddJob(second);
     s.AddJob(third);
     Assert.AreEqual(first, s.PopJob());
     Assert.AreEqual(second, s.PopJob());
     Assert.AreEqual(third, s.PopJob());
 }
Exemplo n.º 4
0
 public void LoadBenchmarkSystem()
 {
     _b = new BenchmarkSystem();
 }
Exemplo n.º 5
0
 public BenchmarkSystem Constructor()
 {
     BenchmarkSystem target = new BenchmarkSystem();
     return target;
     // TODO: add assertions to method BenchmarkSystemTest.Constructor()
 }