- Timestamp:
- 06/15/15 11:57:50 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Services.WebApp.Status/3.3/WebApi/DataController.cs
r12443 r12445 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.Data.Linq; 24 25 using System.Linq; 25 26 using System.Web.Http; … … 72 73 var activeSlaves = onlineSlaves.Where(s => s.IsAllowedToCalculate).ToList(); 73 74 var calculatingSlaves = activeSlaves.Where(s => s.SlaveState == SlaveState.Calculating).ToList(); 74 75 75 int calculatingMemory = calculatingSlaves.Any() ? (int)calculatingSlaves.Sum(s => s.Memory) / 1024 : 0; 76 76 int freeCalculatingMemory = calculatingSlaves.Any() ? (int)calculatingSlaves.Sum(s => s.FreeMemory) / 1024 : 0; … … 128 128 } 129 129 using (var db = new HiveDataContext()) { 130 DataLoadOptions loadOptions = new DataLoadOptions(); 131 loadOptions.LoadWith<Statistics>(o => o.SlaveStatistics); 132 db.LoadOptions = loadOptions; 133 db.DeferredLoadingEnabled = false; 130 134 var statistics = db.Statistics.Where(s => s.Timestamp >= start && s.Timestamp <= end) 131 .OrderBy(s => s.Timestamp); 135 .OrderBy(s => s.Timestamp) 136 .ToList(); 132 137 var status = new DTO.Status { 133 138 CoreStatus = new DTO.CoreStatus(),
Note: See TracChangeset
for help on using the changeset viewer.