Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/14/18 11:47:37 (6 years ago)
Author:
abeham
Message:

#2817: updated to trunk r16140

Location:
branches/2817-BinPackingSpeedup
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/2817-BinPackingSpeedup

  • branches/2817-BinPackingSpeedup/HeuristicLab.Services.WebApp.Statistics

    • Property svn:mergeinfo set to (toggle deleted branches)
      /stable/HeuristicLab.Services.WebApp.Statisticsmergedeligible
      /trunk/HeuristicLab.Services.WebApp.Statisticsmergedeligible
      /branches/1721-RandomForestPersistence/HeuristicLab.Services.WebApp.Statistics10321-10322
      /branches/Algorithms.GradientDescent/HeuristicLab.Services.WebApp.Statistics5516-5520
      /branches/Async/HeuristicLab.Services.WebApp.Statistics13329-15286
      /branches/Benchmarking/sources/HeuristicLab.Services.WebApp.Statistics6917-7005
      /branches/CloningRefactoring/HeuristicLab.Services.WebApp.Statistics4656-4721
      /branches/CodeEditor/HeuristicLab.Services.WebApp.Statistics11700-11806
      /branches/DataAnalysis Refactoring/HeuristicLab.Services.WebApp.Statistics5471-5808
      /branches/DataAnalysis SolutionEnsembles/HeuristicLab.Services.WebApp.Statistics5815-6180
      /branches/DataAnalysis/HeuristicLab.Services.WebApp.Statistics4458-4459,​4462,​4464
      /branches/DataPreprocessing/HeuristicLab.Services.WebApp.Statistics10085-11101
      /branches/GP.Grammar.Editor/HeuristicLab.Services.WebApp.Statistics6284-6795
      /branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Services.WebApp.Statistics5060
      /branches/HLScript/HeuristicLab.Services.WebApp.Statistics10331-10358
      /branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Services.WebApp.Statistics11570-12508
      /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Services.WebApp.Statistics6123-9799
      /branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Services.WebApp.Statistics11130-12721
      /branches/HiveProjectManagement/HeuristicLab.Services.WebApp.Statistics15377-15760
      /branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics12440-12877
      /branches/LogResidualEvaluator/HeuristicLab.Services.WebApp.Statistics10202-10483
      /branches/NET40/sources/HeuristicLab.Services.WebApp.Statistics5138-5162
      /branches/NSGA-II Changes/HeuristicLab.Services.WebApp.Statistics12033-12122
      /branches/ParallelEngine/HeuristicLab.Services.WebApp.Statistics5175-5192
      /branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Services.WebApp.Statistics7568-7810
      /branches/QAPAlgorithms/HeuristicLab.Services.WebApp.Statistics6350-6627
      /branches/Restructure trunk solution/HeuristicLab.Services.WebApp.Statistics6828
      /branches/RuntimeOptimizer/HeuristicLab.Services.WebApp.Statistics8943-9078
      /branches/ScatterSearch (trunk integration)/HeuristicLab.Services.WebApp.Statistics7787-8333
      /branches/SlaveShutdown/HeuristicLab.Services.WebApp.Statistics8944-8956
      /branches/SpectralKernelForGaussianProcesses/HeuristicLab.Services.WebApp.Statistics10204-10479
      /branches/SuccessProgressAnalysis/HeuristicLab.Services.WebApp.Statistics5370-5682
      /branches/Trunk/HeuristicLab.Services.WebApp.Statistics6829-6865
      /branches/UnloadJobs/HeuristicLab.Services.WebApp.Statistics9168-9215
      /branches/VNS/HeuristicLab.Services.WebApp.Statistics5594-5752
      /branches/crossvalidation-2434/HeuristicLab.Services.WebApp.Statistics12948-12950
      /branches/histogram/HeuristicLab.Services.WebApp.Statistics5959-6341
      /branches/symbreg-factors-2650/HeuristicLab.Services.WebApp.Statistics14232-14825
  • branches/2817-BinPackingSpeedup/HeuristicLab.Services.WebApp.Statistics/3.3/WebApi/ClientController.cs

    r16140 r16141  
    7474                  on client.Id equals info.ClientId into clientInfoJoin
    7575                from clientInfo in clientInfoJoin.OrderByDescending(x => x.Time).Take(1)
    76                 let offline = (client.ExpirationTime != null || clientInfo.SlaveState == SlaveState.Offline)
     76                let offline = (client.DateExpired != null || clientInfo.SlaveState == SlaveState.Offline)
     77                let parent = client.ParentResourceId.HasValue ? dimClientDao.GetById(client.ParentResourceId.Value) : null
    7778                select new DT.ClientDetails {
    7879                  Id = client.Id,
     
    8586                  State = offline ? SlaveState.Offline.ToString() : clientInfo.SlaveState.ToString(),
    8687                  LastUpdate = clientInfo.Time,
    87                   GroupId = client.ResourceGroupId,
    88                   GroupName = client.GroupName,
     88                  GroupId = client.ParentResourceId,
     89                  GroupName = parent != null ? parent.Name : null,
    8990                  UpTime = offline ? 0 : upTime,
    9091                  TotalUnavailableTime = timeData != null ? timeData.TotalUnavailableTime : 0,
     
    117118      var factClientInfoDao = pm.FactClientInfoDao;
    118119      return pm.UseTransaction(() => {
    119         var clients = expired ? dimClientDao.GetExpiredClients() : dimClientDao.GetActiveClients();
     120        var clients = expired ? dimClientDao.GetAllExpiredSlaves() : dimClientDao.GetAllOnlineSlaves();
    120121        var query = (from client in clients
    121122                     join info in factClientInfoDao.GetAll()
     
    123124                     from clientInfo in clientInfoJoin.OrderByDescending(x => x.Time).Take(1)
    124125                     let offline = (expired || clientInfo.SlaveState == SlaveState.Offline)
     126                     let parent = client.ParentResourceId.HasValue ? dimClientDao.GetById(client.ParentResourceId.Value) : null
    125127                     select new DT.Client {
    126128                       Id = client.Id,
     
    132134                       CpuUtilization = offline ? 0 : clientInfo.CpuUtilization,
    133135                       State = offline ? SlaveState.Offline.ToString() : clientInfo.SlaveState.ToString(),
    134                        GroupId = client.ResourceGroupId,
    135                        GroupName = client.GroupName,
     136                       GroupId = client.ParentResourceId,
     137                       GroupName = parent != null ? parent.Name : null,
    136138                       IsAllowedToCalculate = clientInfo.IsAllowedToCalculate
    137139                     });
     
    200202      var factClientInfoDao = pm.FactClientInfoDao;
    201203      return pm.UseTransaction(() => {
    202         var clients = expired ? dimClientDao.GetExpiredClients() : dimClientDao.GetActiveClients();
    203         clients = clients.Where(x => x.ResourceGroupId == id);
     204        var clients = expired ? dimClientDao.GetAllExpiredClients() : dimClientDao.GetAllOnlineClients();
     205        clients = clients.Where(x => x.ParentResourceId == id);
    204206        var query = (from client in clients
    205207                     join info in factClientInfoDao.GetAll()
     
    207209                     from clientInfo in clientInfoJoin.OrderByDescending(x => x.Time).Take(1)
    208210                     let offline = (expired || clientInfo.SlaveState == SlaveState.Offline)
     211                     let parent = client.ParentResourceId.HasValue ? dimClientDao.GetById(client.ParentResourceId.Value) : null
    209212                     select new DT.Client {
    210213                       Id = client.Id,
     
    216219                       CpuUtilization = offline ? 0 : clientInfo.CpuUtilization,
    217220                       State = offline ? SlaveState.Offline.ToString() : clientInfo.SlaveState.ToString(),
    218                        GroupId = client.ResourceGroupId,
    219                        GroupName = client.GroupName,
     221                       GroupId = client.ParentResourceId,
     222                       GroupName = parent != null ? parent.Name : null,
    220223                       IsAllowedToCalculate = clientInfo.IsAllowedToCalculate
    221224                     });
     
    247250          client => client.Id,
    248251          (fact, client) => new {
    249             client.ResourceGroupId,
     252            client.ParentResourceId,
    250253            fact.Time,
    251254            fact.CpuUtilization,
     
    255258            fact.UsedMemory
    256259          })
    257         .Where(x => x.ResourceGroupId == id)
     260        .Where(x => x.ParentResourceId == id)
    258261        .ToList();
    259262      var clientStatus = new DT.ClientStatus {
Note: See TracChangeset for help on using the changeset viewer.