示例#1
0
        /// <summary>
        /// Constructor
        /// Creates subscriptions to the BenchmarkSystem EventHandlers
        /// </summary>
        /// <param name="benchmark">The Benchmark containing this Logger</param>
        public Logger(BenchmarkSystem benchmark, ITM_DAO dao)
        {
            Contract.Requires(benchmark != null);
            Contract.Requires(dao != null);

            _tmDAO = dao;
            benchmark.JobSubmitted += OnJobSubmitted;
            benchmark.JobCancelled += OnJobCancelled;
            benchmark.JobRunning += OnJobRunning;
            benchmark.JobTerminated += OnJobTerminated;
            benchmark.JobFailed += OnJobFailed;
            benchmark.JobDone += OnJobDone;
        }
示例#2
0
 /// <summary>
 /// The constructor
 /// </summary>
 public BenchmarkSystem()
 {
     _threads = new List<Job>();
     _jobs = new Dictionary<User, List<Job>>();
     _isFinishing = true;
     _tmDAO = new TM2SQL_DAO();
     _logger = new Logger(this, _tmDAO);
     _scheduler = new Scheduler();
     _scheduler.JobDone += OnJobDone;
     _scheduler.JobFailed += OnJobFailed;
     _scheduler.JobTerminated += OnJobTerminated;
     SetStatus();
 }
示例#3
0
 public void Initializer()
 {
     _tmDAO = new TM2SQL_DAO();
 }