Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/07/09 14:34:33 (15 years ago)
Author:
kgrading
Message:

added the "coresNeeded" and made a fallback concerning dynamic plugin loading... (#467)

File:
1 edited

Legend:

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

    r1449 r1755  
    135135    }
    136136
     137    public int GetUsedCores() {
     138      Dictionary<Guid, Executor> engines = Core.GetExecutionEngines();
     139      Dictionary<Guid, Job> jobs = Core.GetJobs();
     140      int usedCores = 0;
     141      lock (engines) {       
     142        foreach (KeyValuePair<Guid, Job> kvp in jobs)
     143          usedCores += kvp.Value.CoresNeeded;
     144      }
     145      return usedCores;
     146    }
     147
    137148  }
    138149}
Note: See TracChangeset for help on using the changeset viewer.