Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/11/12 15:37:03 (12 years ago)
Author:
ascheibe
Message:

#1994 added displaying of real cpu load and real available cores

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Services.Hive.Web/Hive-3.3/Status.aspx.cs

    r9022 r9023  
    6666    }, false, false);
    6767
    68     int currentlyAvailableCores = onlineSlaves.Where(s => s.Cores.HasValue).Sum(s => s.Cores.Value);
    69     int currentlyUsedCores = currentlyAvailableCores - onlineSlaves.Where(s => s.FreeCores.HasValue).Sum(s => s.FreeCores.Value);
     68    int overallCurrentlyAvailableCores = onlineSlaves.Where(s => s.Cores.HasValue).Sum(s => s.Cores.Value);
     69    int currentlyAvailableCores = onlineSlaves.Where(s => s.Cores.HasValue && s.IsAllowedToCalculate).Sum(s => s.Cores.Value);
     70    int currentlyUsedCores = overallCurrentlyAvailableCores - onlineSlaves.Where(s => s.FreeCores.HasValue).Sum(s => s.FreeCores.Value);
    7071   
     72    this.overallAvailableCoresLabel.Text = overallCurrentlyAvailableCores.ToString();
    7173    this.availableCoresLabel.Text = currentlyAvailableCores.ToString();
    7274    this.usedCoresLabel.Text = currentlyUsedCores.ToString();
     
    7577    slavesLabel.Text = string.Join(", ", onlineSlaves.Select(x => string.Format("<a href=\"?resource={0}\">{0}</a> ({1} %)", x.Name, Math.Round(x.CpuUtilization, 2))));
    7678
    77     cpuUtilizationLabel.Text = (onlineSlaves.Count() > 0 ? Math.Round(onlineSlaves.Average(s => s.CpuUtilization), 2).ToString() : "0.0") + " %";
     79    overallCpuUtilizationLabel.Text = (onlineSlaves.Count() > 0 ? Math.Round(onlineSlaves.Average(s => s.CpuUtilization), 2).ToString() : "0.0") + " %";
     80    cpuUtilizationLabel.Text = (onlineSlaves.Count() > 0 ? Math.Round(onlineSlaves.Where(x => x.IsAllowedToCalculate).Average(s => s.CpuUtilization), 2).ToString() : "0.0") + " %";
    7881
    7982    DT.Statistics[] stats = new DT.Statistics[0];   
Note: See TracChangeset for help on using the changeset viewer.