Free cookie consent management tool by TermsFeed Policy Generator

Changeset 6946


Ignore:
Timestamp:
11/04/11 11:20:22 (13 years ago)
Author:
ascheibe
Message:

#1233

  • disable logging of the user statistics on the server because of high run time demands
  • also show in the slave UI the timestamps of arrived messages
Location:
branches/HeuristicLab.Hive-3.4/sources
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Views/3.3/LogView.cs

    r6743 r6946  
    6969    #region Event Handlers
    7070    void Content_SlaveMessageLogged(object sender, EventArgs<string> e) {
     71      string msg = string.Format("{0}: {1} {2}", DateTime.Now.ToString("HH:mm:ss"), e.Value, Environment.NewLine);
     72
    7173      if (txtLog.InvokeRequired) {
    72         txtLog.Invoke(new Action<string>(txtLog.AppendText), e.Value + Environment.NewLine);
     74        txtLog.Invoke(new Action<string>(txtLog.AppendText), msg);
    7375      } else {
    74         txtLog.AppendText(e.Value + Environment.NewLine);
     76        txtLog.AppendText(msg);
    7577      }
    7678    }
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.3/HiveDao.cs

    r6756 r6946  
    722722          db.SlaveStatistics.InsertOnSubmit(DT.Convert.ToEntity(slaveStat));
    723723        }
    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          }
    727729        }
    728730        db.SubmitChanges();
     
    755757        }
    756758
    757         var executionTimesByUser = from job in db.Tasks
    758                                    group job by job.Job.OwnerUserId into g
     759        var executionTimesByUser = from task in db.Tasks
     760                                   group task by task.Job.OwnerUserId into g
    759761                                   select new { UserId = g.Key, ExecutionTime = TimeSpan.FromMilliseconds(g.Select(x => x.ExecutionTimeMs).Sum()) };
    760762        foreach (var item in executionTimesByUser) {
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.3/Manager/EventManager.cs

    r6743 r6946  
    6767      }
    6868      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();
    7073      dao.AddStatistics(stats);
    7174    }
Note: See TracChangeset for help on using the changeset viewer.