Free cookie consent management tool by TermsFeed Policy Generator

Changeset 9373


Ignore:
Timestamp:
04/17/13 15:43:37 (10 years ago)
Author:
pfleck
Message:

#2030
Added MultiSlaveRunner for starting multiple Slave Cores on a single Machine.
Mocked GUID generation for slaves to random GUID.
Deactivated PerformanceCounter measurements from ConfigManager to avoid shared resource locks.

Location:
branches/HivePerformance/sources
Files:
10 added
2 edited

Legend:

Unmodified
Added
Removed
  • branches/HivePerformance/sources/HeuristicLab 3.3 Hive.Slave.sln

    r7009 r9373  
    1717EndProject
    1818Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "HeuristicLab.Clients.Hive.Slave.WindowsServiceSetup-3.3", "HeuristicLab.Clients.Hive.Slave.WindowsServiceSetup\HeuristicLab.Clients.Hive.Slave.WindowsServiceSetup.vdproj", "{C16CA1A6-7AE8-4B87-A6A6-9C290E8B9646}"
     19EndProject
     20Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Clients.Hive.Slave.MultiSlavesRunner-3.3", "HeuristicLab.Clients.Hive.Slave.MultiSlavesRunner\3.3\HeuristicLab.Clients.Hive.Slave.MultiSlavesRunner-3.3.csproj", "{597AF775-8F89-4139-B303-FC14F0CC828A}"
    1921EndProject
    2022Global
     
    124126    {C16CA1A6-7AE8-4B87-A6A6-9C290E8B9646}.Release|x86.ActiveCfg = Release
    125127    {C16CA1A6-7AE8-4B87-A6A6-9C290E8B9646}.Release|x86.Build.0 = Release
     128    {597AF775-8F89-4139-B303-FC14F0CC828A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
     129    {597AF775-8F89-4139-B303-FC14F0CC828A}.Debug|Any CPU.Build.0 = Debug|Any CPU
     130    {597AF775-8F89-4139-B303-FC14F0CC828A}.Debug|x64.ActiveCfg = Debug|Any CPU
     131    {597AF775-8F89-4139-B303-FC14F0CC828A}.Debug|x86.ActiveCfg = Debug|Any CPU
     132    {597AF775-8F89-4139-B303-FC14F0CC828A}.Release|Any CPU.ActiveCfg = Release|Any CPU
     133    {597AF775-8F89-4139-B303-FC14F0CC828A}.Release|Any CPU.Build.0 = Release|Any CPU
     134    {597AF775-8F89-4139-B303-FC14F0CC828A}.Release|x64.ActiveCfg = Release|Any CPU
     135    {597AF775-8F89-4139-B303-FC14F0CC828A}.Release|x86.ActiveCfg = Release|Any CPU
    126136  EndGlobalSection
    127137  GlobalSection(SolutionProperties) = preSolution
  • branches/HivePerformance/sources/HeuristicLab.Clients.Hive.Slave/3.3/Manager/ConfigManager.cs

    r7857 r9373  
    2222using System;
    2323using System.Collections.Generic;
    24 using System.Diagnostics;
    2524using System.Linq;
    2625using System.Management;
     
    4544    private TaskManager jobManager;
    4645    private Slave slave;
    47     private PerformanceCounter cpuCounter;
    48     private PerformanceCounter memCounter;
     46    //private PerformanceCounter cpuCounter;
     47    //private PerformanceCounter memCounter;
    4948
    5049    /// <summary>
     
    5352    public ConfigManager(TaskManager jobManager) {
    5453      this.jobManager = jobManager;
    55       cpuCounter = new PerformanceCounter();
     54      /*cpuCounter = new PerformanceCounter();
    5655      cpuCounter.CategoryName = "Processor";
    5756      cpuCounter.CounterName = "% Processor Time";
    58       cpuCounter.InstanceName = "_Total";
    59       memCounter = new PerformanceCounter("Memory", "Available Bytes", true);
     57      cpuCounter.InstanceName = "_Total";*/
     58      //memCounter = new PerformanceCounter("Memory", "Available Bytes", true);
    6059
    6160      Asleep = false;
     
    136135
    137136    public static Guid GetUniqueMachineId() {
     137      // mock slave id
     138      return Guid.NewGuid();
     139      /*
    138140      Guid id;
     141
    139142      try {
    140143        id = GetUniqueMachineIdFromMac();
     
    145148      }
    146149      return id;
     150      */
    147151    }
    148152
     
    254258
    255259      try {
    256         mb = (int)(memCounter.NextValue() / 1024 / 1024);
     260        //mb = (int)(memCounter.NextValue() / 1024 / 1024);
     261        mb = 1024;
    257262      }
    258263      catch { }
     
    262267    public float GetCpuUtilization() {
    263268      float cpuVal = 0.0F;
    264 
    265       try {
     269      /*try {
    266270        return cpuCounter.NextValue();
    267271      }
    268       catch { }
     272      catch { }    */
    269273      return cpuVal;
    270274    }
Note: See TracChangeset for help on using the changeset viewer.