- Timestamp:
- 11/04/11 11:20:22 (13 years ago)
- Location:
- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.3/HiveDao.cs
r6756 r6946 722 722 db.SlaveStatistics.InsertOnSubmit(DT.Convert.ToEntity(slaveStat)); 723 723 } 724 foreach (var userStat in dto.UserStatistics) { 725 userStat.Id = entity.StatisticsId; 726 db.UserStatistics.InsertOnSubmit(DT.Convert.ToEntity(userStat)); 724 if (dto.UserStatistics != null) { 725 foreach (var userStat in dto.UserStatistics) { 726 userStat.Id = entity.StatisticsId; 727 db.UserStatistics.InsertOnSubmit(DT.Convert.ToEntity(userStat)); 728 } 727 729 } 728 730 db.SubmitChanges(); … … 755 757 } 756 758 757 var executionTimesByUser = from jobin db.Tasks758 group job by job.Job.OwnerUserId into g759 var executionTimesByUser = from task in db.Tasks 760 group task by task.Job.OwnerUserId into g 759 761 select new { UserId = g.Key, ExecutionTime = TimeSpan.FromMilliseconds(g.Select(x => x.ExecutionTimeMs).Sum()) }; 760 762 foreach (var item in executionTimesByUser) { -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.3/Manager/EventManager.cs
r6743 r6946 67 67 } 68 68 stats.SlaveStatistics = slaveStats; 69 stats.UserStatistics = dao.GetUserStatistics(); 69 //collecting user statistics slows down the db and results in timeouts. 70 //we have to find another way to deal with this. 71 //until then the next line is commented out... 72 //stats.UserStatistics = dao.GetUserStatistics(); 70 73 dao.AddStatistics(stats); 71 74 }
Note: See TracChangeset
for help on using the changeset viewer.