Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/14/09 16:03:50 (15 years ago)
Author:
kgrading
Message:

corrected the progress calculation (#457)

Location:
trunk/sources/HeuristicLab.Hive.Client.Core
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Hive.Client.Core/ConfigurationManager/ConfigManager.cs

    r1034 r1119  
    106106      return st;     
    107107    }
     108
     109    public Dictionary<long, double> GetProgressOfAllJobs() {
     110      Dictionary<long,double> prog = new Dictionary<long,double>();
     111      Dictionary<long, Executor> engines = Core.GetExecutionEngines();
     112      foreach (KeyValuePair<long, Executor> kvp in engines) {
     113        Executor e = kvp.Value;
     114        prog[e.JobId] = e.Progress;
     115      }
     116      return prog;
     117    }
     118
    108119  }
    109120}
  • trunk/sources/HeuristicLab.Hive.Client.Core/Core.cs

    r1103 r1119  
    162162        AppDomain appDomain = PluginManager.Manager.CreateAndInitAppDomainWithSandbox(e.Result.Job.Id.ToString(), sandboxed, typeof(TestJob));
    163163        appDomain.UnhandledException += new UnhandledExceptionEventHandler(appDomain_UnhandledException);
    164         lock (Locker) {
     164        lock (Locker) {                   
    165165          if (!jobs.ContainsKey(e.Result.Job.Id)) {
    166166            jobs.Add(e.Result.Job.Id, e.Result.Job);
  • trunk/sources/HeuristicLab.Hive.Client.Core/Heartbeat.cs

    r1097 r1119  
    7474      ClientInfo info = ConfigManager.Instance.GetClientInfo();
    7575      // Todo: remove tempfix for free cores.
    76       // TODO: change jobProgress from int to Dictionary of Job and Double
    77       HeartBeatData heartBeatData = new HeartBeatData { ClientId = info.ClientId,
    78                                                               freeCores = info.NrOfCores - (ClientStatusInfo.JobsFetched - ClientStatusInfo.JobsProcessed),
    79                                                               freeMemory = 1000,
    80                                                               jobProgress = ClientStatusInfo.JobsFetched - ClientStatusInfo.JobsProcessed};
     76
     77      HeartBeatData heartBeatData = new HeartBeatData {
     78        ClientId = info.ClientId,
     79        freeCores = info.NrOfCores - (ClientStatusInfo.JobsFetched - ClientStatusInfo.JobsProcessed),
     80        freeMemory = 1000,
     81        jobProgress = ConfigManager.Instance.GetProgressOfAllJobs()
     82      };
    8183      if (wcfService.ConnState == NetworkEnum.WcfConnState.Failed) {
    8284        wcfService.Connect();
Note: See TracChangeset for help on using the changeset viewer.