- Timestamp:
- 09/14/18 11:47:37 (6 years ago)
- Location:
- branches/2817-BinPackingSpeedup
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2817-BinPackingSpeedup
- Property svn:mergeinfo changed
-
branches/2817-BinPackingSpeedup/HeuristicLab.Services.WebApp.Statistics
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
/stable/HeuristicLab.Services.WebApp.Statistics merged eligible /trunk/HeuristicLab.Services.WebApp.Statistics merged eligible /branches/1721-RandomForestPersistence/HeuristicLab.Services.WebApp.Statistics 10321-10322 /branches/Algorithms.GradientDescent/HeuristicLab.Services.WebApp.Statistics 5516-5520 /branches/Async/HeuristicLab.Services.WebApp.Statistics 13329-15286 /branches/Benchmarking/sources/HeuristicLab.Services.WebApp.Statistics 6917-7005 /branches/CloningRefactoring/HeuristicLab.Services.WebApp.Statistics 4656-4721 /branches/CodeEditor/HeuristicLab.Services.WebApp.Statistics 11700-11806 /branches/DataAnalysis Refactoring/HeuristicLab.Services.WebApp.Statistics 5471-5808 /branches/DataAnalysis SolutionEnsembles/HeuristicLab.Services.WebApp.Statistics 5815-6180 /branches/DataAnalysis/HeuristicLab.Services.WebApp.Statistics 4458-4459,4462,4464 /branches/DataPreprocessing/HeuristicLab.Services.WebApp.Statistics 10085-11101 /branches/GP.Grammar.Editor/HeuristicLab.Services.WebApp.Statistics 6284-6795 /branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Services.WebApp.Statistics 5060 /branches/HLScript/HeuristicLab.Services.WebApp.Statistics 10331-10358 /branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Services.WebApp.Statistics 11570-12508 /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Services.WebApp.Statistics 6123-9799 /branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Services.WebApp.Statistics 11130-12721 /branches/HiveProjectManagement/HeuristicLab.Services.WebApp.Statistics 15377-15760 /branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics 12440-12877 /branches/LogResidualEvaluator/HeuristicLab.Services.WebApp.Statistics 10202-10483 /branches/NET40/sources/HeuristicLab.Services.WebApp.Statistics 5138-5162 /branches/NSGA-II Changes/HeuristicLab.Services.WebApp.Statistics 12033-12122 /branches/ParallelEngine/HeuristicLab.Services.WebApp.Statistics 5175-5192 /branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Services.WebApp.Statistics 7568-7810 /branches/QAPAlgorithms/HeuristicLab.Services.WebApp.Statistics 6350-6627 /branches/Restructure trunk solution/HeuristicLab.Services.WebApp.Statistics 6828 /branches/RuntimeOptimizer/HeuristicLab.Services.WebApp.Statistics 8943-9078 /branches/ScatterSearch (trunk integration)/HeuristicLab.Services.WebApp.Statistics 7787-8333 /branches/SlaveShutdown/HeuristicLab.Services.WebApp.Statistics 8944-8956 /branches/SpectralKernelForGaussianProcesses/HeuristicLab.Services.WebApp.Statistics 10204-10479 /branches/SuccessProgressAnalysis/HeuristicLab.Services.WebApp.Statistics 5370-5682 /branches/Trunk/HeuristicLab.Services.WebApp.Statistics 6829-6865 /branches/UnloadJobs/HeuristicLab.Services.WebApp.Statistics 9168-9215 /branches/VNS/HeuristicLab.Services.WebApp.Statistics 5594-5752 /branches/crossvalidation-2434/HeuristicLab.Services.WebApp.Statistics 12948-12950 /branches/histogram/HeuristicLab.Services.WebApp.Statistics 5959-6341 /branches/symbreg-factors-2650/HeuristicLab.Services.WebApp.Statistics 14232-14825
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
-
branches/2817-BinPackingSpeedup/HeuristicLab.Services.WebApp.Statistics/3.3/WebApi/ClientController.cs
r16140 r16141 74 74 on client.Id equals info.ClientId into clientInfoJoin 75 75 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 77 78 select new DT.ClientDetails { 78 79 Id = client.Id, … … 85 86 State = offline ? SlaveState.Offline.ToString() : clientInfo.SlaveState.ToString(), 86 87 LastUpdate = clientInfo.Time, 87 GroupId = client. ResourceGroupId,88 GroupName = client.GroupName,88 GroupId = client.ParentResourceId, 89 GroupName = parent != null ? parent.Name : null, 89 90 UpTime = offline ? 0 : upTime, 90 91 TotalUnavailableTime = timeData != null ? timeData.TotalUnavailableTime : 0, … … 117 118 var factClientInfoDao = pm.FactClientInfoDao; 118 119 return pm.UseTransaction(() => { 119 var clients = expired ? dimClientDao.Get ExpiredClients() : dimClientDao.GetActiveClients();120 var clients = expired ? dimClientDao.GetAllExpiredSlaves() : dimClientDao.GetAllOnlineSlaves(); 120 121 var query = (from client in clients 121 122 join info in factClientInfoDao.GetAll() … … 123 124 from clientInfo in clientInfoJoin.OrderByDescending(x => x.Time).Take(1) 124 125 let offline = (expired || clientInfo.SlaveState == SlaveState.Offline) 126 let parent = client.ParentResourceId.HasValue ? dimClientDao.GetById(client.ParentResourceId.Value) : null 125 127 select new DT.Client { 126 128 Id = client.Id, … … 132 134 CpuUtilization = offline ? 0 : clientInfo.CpuUtilization, 133 135 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, 136 138 IsAllowedToCalculate = clientInfo.IsAllowedToCalculate 137 139 }); … … 200 202 var factClientInfoDao = pm.FactClientInfoDao; 201 203 return pm.UseTransaction(() => { 202 var clients = expired ? dimClientDao.Get ExpiredClients() : 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); 204 206 var query = (from client in clients 205 207 join info in factClientInfoDao.GetAll() … … 207 209 from clientInfo in clientInfoJoin.OrderByDescending(x => x.Time).Take(1) 208 210 let offline = (expired || clientInfo.SlaveState == SlaveState.Offline) 211 let parent = client.ParentResourceId.HasValue ? dimClientDao.GetById(client.ParentResourceId.Value) : null 209 212 select new DT.Client { 210 213 Id = client.Id, … … 216 219 CpuUtilization = offline ? 0 : clientInfo.CpuUtilization, 217 220 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, 220 223 IsAllowedToCalculate = clientInfo.IsAllowedToCalculate 221 224 }); … … 247 250 client => client.Id, 248 251 (fact, client) => new { 249 client. ResourceGroupId,252 client.ParentResourceId, 250 253 fact.Time, 251 254 fact.CpuUtilization, … … 255 258 fact.UsedMemory 256 259 }) 257 .Where(x => x. ResourceGroupId == id)260 .Where(x => x.ParentResourceId == id) 258 261 .ToList(); 259 262 var clientStatus = new DT.ClientStatus { -
branches/2817-BinPackingSpeedup/HeuristicLab.Services.WebApp.Statistics/3.3/WebApi/GroupController.cs
r16140 r16141 42 42 var clientTimeData = factClientInfoDao.GetAll() 43 43 .Join(dimClientDao.GetAll(), x => x.ClientId, y => y.Id, (x, y) => new { 44 y. ResourceGroupId,44 y.ParentResourceId, 45 45 x.IdleTime, 46 46 x.OfflineTime, 47 47 x.UnavailableTime 48 48 }) 49 .Where(x => x. ResourceGroupId == id)50 .GroupBy(x => x. ResourceGroupId)49 .Where(x => x.ParentResourceId == id) 50 .GroupBy(x => x.ParentResourceId) 51 51 .Select(x => new { 52 52 TotalIdleTime = x.Sum(y => y.IdleTime), … … 68 68 }) 69 69 .FirstOrDefault(); 70 return (from client in dimClientDao.GetA ctiveClients().Where(x => x.ResourceGroupId == id)70 return (from client in dimClientDao.GetAllOnlineSlaves().Where(x => x.ParentResourceId == id) 71 71 join info in factClientInfoDao.GetAll() 72 72 on client.Id equals info.ClientId into clientInfoJoin 73 73 from clientInfo in clientInfoJoin.OrderByDescending(x => x.Time).Take(1) 74 74 let offline = (clientInfo.SlaveState == DA.SlaveState.Offline) 75 let parent = client.ParentResourceId.HasValue ? dimClientDao.GetById(client.ParentResourceId.Value) : null 75 76 select new { 76 ResourceGroupId = client. ResourceGroupId,77 GroupName = client.GroupName,77 ResourceGroupId = client.ParentResourceId, 78 GroupName = parent != null ? parent.Name : null, 78 79 TotalCores = clientInfo.NumTotalCores, 79 80 UsedCores = offline ? 0 : clientInfo.NumUsedCores, … … 114 115 var dimClientDao = pm.DimClientDao; 115 116 var factClientInfoDao = pm.FactClientInfoDao; 116 var data = (from client in dimClientDao.GetA ctiveClients()117 var data = (from client in dimClientDao.GetAllOnlineSlaves() 117 118 join info in factClientInfoDao.GetAll() 118 119 on client.Id equals info.ClientId into clientInfoJoin … … 120 121 let offline = (clientInfo.SlaveState == DA.SlaveState.Offline) 121 122 select new { 122 ResourceGroupId = client. ResourceGroupId,123 ResourceGroupId = client.ParentResourceId, 123 124 TotalCores = clientInfo.NumTotalCores, 124 125 UsedCores = offline ? 0 : clientInfo.NumUsedCores, … … 137 138 CpuUtilization = x.Where(y => y.SlaveState != DA.SlaveState.Offline).Average(y => (double?)y.CpuUtilization) ?? 0.0 138 139 }); 139 var query = dimClientDao.GetAll() 140 .GroupBy(x => new { x.ResourceGroupId, x.GroupName }) 141 .Select(x => new { 142 Id = x.Key.ResourceGroupId ?? default(Guid), 143 Name = x.Key.GroupName 144 }); 140 141 var query = dimClientDao.GetAllOnlineSlaveGroups().Select(x => new { 142 Id = x.ResourceId, 143 Name = x.Name 144 }); 145 145 return pm.UseTransaction(() => new DT.GroupPage { 146 146 TotalGroups = query.Count(),
Note: See TracChangeset
for help on using the changeset viewer.