Free cookie consent management tool by TermsFeed Policy Generator

Changeset 11259


Ignore:
Timestamp:
08/04/14 13:01:40 (10 years ago)
Author:
mroscoe
Message:
 
Location:
branches/HiveStatistics/sources
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml

    r11222 r11259  
    288288      <Column Name="TotalTimeOffline" Type="System.Double" DbType="Float NOT NULL" CanBeNull="false" />
    289289      <Column Name="TotalTimeUnavailable" Type="System.Double" DbType="Float NOT NULL" CanBeNull="false" />
     290      <Column Name="SlaveState" Type="global::HeuristicLab.Services.Hive.DataAccess.SlaveState" DbType="VarChar(15)" CanBeNull="false" />
    290291      <Association Name="DimClient_FactClientInfo" Member="DimClient" ThisKey="ClientId" OtherKey="Id" Type="DimClient" IsForeignKey="true" />
    291292      <Association Name="DimTime_FactClientInfo" Member="DimTime" ThisKey="Time" OtherKey="Time" Type="DimTime" IsForeignKey="true" />
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml.layout

    r11222 r11259  
    200200      </nodes>
    201201    </associationConnector>
    202     <associationConnector edgePoints="[(6.5 : 1.69314697265625); (6.125 : 1.69314697265625)]" fixedFrom="Algorithm" fixedTo="Algorithm">
     202    <associationConnector edgePoints="[(6.5 : 1.69314697265625); (6.125 : 1.69314697265625)]" fixedFrom="NotFixed" fixedTo="NotFixed">
    203203      <AssociationMoniker Name="/HiveDataContext/Task/Task_TaskData" />
    204204      <nodes>
     
    207207      </nodes>
    208208    </associationConnector>
    209     <associationConnector edgePoints="[(6.5 : 2.50564697265625); (3.75 : 2.50564697265625)]" fixedFrom="Algorithm" fixedTo="Algorithm">
     209    <associationConnector edgePoints="[(6.5 : 2.50564697265625); (3.75 : 2.50564697265625)]" fixedFrom="NotFixed" fixedTo="NotFixed">
    210210      <AssociationMoniker Name="/HiveDataContext/Task/Task_StateLog" />
    211211      <nodes>
     
    277277      </nestedChildShapes>
    278278    </classShape>
    279     <classShape Id="053a5cff-b18a-4ee5-8d43-48ed5c5dcfad" absoluteBounds="2.625, 11, 2, 3.3093082682291666">
     279    <classShape Id="053a5cff-b18a-4ee5-8d43-48ed5c5dcfad" absoluteBounds="2.625, 11, 2, 3.5016097005208326">
    280280      <DataClassMoniker Name="/HiveDataContext/FactClientInfo" />
    281281      <nestedChildShapes>
    282         <elementListCompartment Id="0a1cc913-6636-455c-95b3-302f533527db" absoluteBounds="2.6399999999999997, 11.46, 1.9700000000000002, 2.7493082682291665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     282        <elementListCompartment Id="0a1cc913-6636-455c-95b3-302f533527db" absoluteBounds="2.6399999999999997, 11.46, 1.9700000000000002, 2.941609700520833" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    283283      </nestedChildShapes>
    284284    </classShape>
     
    290290      </nodes>
    291291    </associationConnector>
    292     <associationConnector edgePoints="[(8.5 : 10.7035953776042); (8.5 : 11.25)]" fixedFrom="Algorithm" fixedTo="Algorithm">
     292    <associationConnector edgePoints="[(8.5 : 10.7035953776042); (8.5 : 11.25)]" fixedFrom="NotFixed" fixedTo="NotFixed">
    293293      <AssociationMoniker Name="/HiveDataContext/DimJob/DimJob_FactTask" />
    294294      <nodes>
     
    297297      </nodes>
    298298    </associationConnector>
    299     <associationConnector edgePoints="[(5.02343625 : 10.2708968098958); (5.02343625 : 14.6266072005208); (5.90885291666667 : 14.6266072005208 : JumpStart); (6.07551958333333 : 14.6266072005208 : JumpEnd); (6.875 : 14.6266072005208)]" fixedFrom="Algorithm" fixedTo="Algorithm">
     299    <associationConnector edgePoints="[(5.02343625 : 10.2708968098958); (5.02343625 : 14.7227579166667); (6.875 : 14.7227579166667)]" fixedFrom="NotFixed" fixedTo="NotFixed">
    300300      <AssociationMoniker Name="/HiveDataContext/DimTime/DimTime_FactTask" />
    301301      <nodes>
     
    311311      </nodes>
    312312    </associationConnector>
    313     <associationConnector edgePoints="[(5.99218625 : 15.25); (5.99218625 : 12.1788329785157); (5.50521083333333 : 12.1788329785157 : JumpStart); (5.33854416666667 : 12.1788329785157 : JumpEnd); (5.10676958333333 : 12.1788329785157 : JumpStart); (4.94010291666667 : 12.1788329785157 : JumpEnd); (4.625 : 12.1788329785157)]" fixedFrom="Algorithm" fixedTo="Algorithm">
     313    <associationConnector edgePoints="[(5.99218625 : 15.25); (5.99218625 : 12.1788329785157); (5.50521083333333 : 12.1788329785157 : JumpStart); (5.33854416666667 : 12.1788329785157 : JumpEnd); (5.10676958333333 : 12.1788329785157 : JumpStart); (4.94010291666667 : 12.1788329785157 : JumpEnd); (4.625 : 12.1788329785157)]" fixedFrom="NotFixed" fixedTo="NotFixed">
    314314      <AssociationMoniker Name="/HiveDataContext/DimClient/DimClient_FactClientInfo" />
    315315      <nodes>
     
    318318      </nodes>
    319319    </associationConnector>
    320     <associationConnector edgePoints="[(4.125 : 10.2708968098958); (4.125 : 11)]" fixedFrom="Algorithm" fixedTo="Algorithm">
     320    <associationConnector edgePoints="[(4.125 : 10.2708968098958); (4.125 : 11)]" fixedFrom="NotFixed" fixedTo="NotFixed">
    321321      <AssociationMoniker Name="/HiveDataContext/DimTime/DimTime_FactClientInfo" />
    322322      <nodes>
     
    325325      </nodes>
    326326    </associationConnector>
    327     <associationConnector edgePoints="[(1.59375 : 10.0689925130208); (1.59375 : 12.6546541341146); (2.625 : 12.6546541341146)]" fixedFrom="Algorithm" fixedTo="Algorithm">
     327    <associationConnector edgePoints="[(1.59375 : 10.0689925130208); (1.59375 : 12.7508048502604); (2.625 : 12.7508048502604)]" fixedFrom="NotFixed" fixedTo="NotFixed">
    328328      <AssociationMoniker Name="/HiveDataContext/DimUser/DimUser_FactClientInfo" />
    329329      <nodes>
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.designer.cs

    r11222 r11259  
    59515951    private double _TotalTimeUnavailable;
    59525952   
     5953    private global::HeuristicLab.Services.Hive.DataAccess.SlaveState _SlaveState;
     5954   
    59535955    private EntityRef<DimClient> _DimClient;
    59545956   
     
    59875989    partial void OnTotalTimeUnavailableChanging(double value);
    59885990    partial void OnTotalTimeUnavailableChanged();
     5991    partial void OnSlaveStateChanging(global::HeuristicLab.Services.Hive.DataAccess.SlaveState value);
     5992    partial void OnSlaveStateChanged();
    59895993    #endregion
    59905994   
     
    62696273    }
    62706274   
     6275    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SlaveState", DbType="VarChar(15)", CanBeNull=false)]
     6276    public global::HeuristicLab.Services.Hive.DataAccess.SlaveState SlaveState
     6277    {
     6278      get
     6279      {
     6280        return this._SlaveState;
     6281      }
     6282      set
     6283      {
     6284        if ((this._SlaveState != value))
     6285        {
     6286          this.OnSlaveStateChanging(value);
     6287          this.SendPropertyChanging();
     6288          this._SlaveState = value;
     6289          this.SendPropertyChanged("SlaveState");
     6290          this.OnSlaveStateChanged();
     6291        }
     6292      }
     6293    }
     6294   
    62716295    [global::System.Data.Linq.Mapping.AssociationAttribute(Name="DimClient_FactClientInfo", Storage="_DimClient", ThisKey="ClientId", OtherKey="Id", IsForeignKey=true)]
    62726296    public DimClient DimClient
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/SQL Scripts/Initialize Hive Database.sql

    r11222 r11259  
    239239    [TotalMemory]           INT              NOT NULL,
    240240    [CpuUtilization]        FLOAT (53)       NOT NULL,
     241  [SlaveState]      VarChar(15)    NOT NULL,
    241242    [TotalTimeIdle]         FLOAT (53)       NOT NULL,
    242243    [TotalTimeCalculating]  FLOAT (53)       NOT NULL,
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/App_Code/ChartHelper.cshtml

    r11252 r11259  
    448448}
    449449
    450 @helper CreateStreamChart(string dataName, string destinationTag, string url, string title, string format = null, double? maxY = null)
     450@helper CreateStreamChart(string dataName, string destinationTag, string url, string title, string slaveState, string format = null, double? maxY = null)
    451451{
    452452  <text>
     
    459459  //Get the most recent value(s) from the given URL
    460460  $.ajax({
    461     async: false, url: '@(url)', datatype: "json", success: function (result) {
     461    async: false, url: "@(url)?state=" + @(slaveState), datatype: "json", success: function (result) {
    462462      for(i = 0; i < result.length; i++) {
    463463        @(dataName)CurrentValue[i] = result[i];
     
    531531}
    532532
    533 @helper UpdateStreamChart(string dataName, string destinationTag, string url, string fixedY = null)
     533@helper UpdateStreamChart(string dataName, string destinationTag, string url, string slaveState, string fixedY = null)
    534534{
    535535  <text>
     
    543543  //Get the up-to-date data, each result assigned to it's own array
    544544  $.ajax({
    545     async: false, url: '@(url)', datatype: "json", success: function (result) {
     545    async: false, url: "@(url)?state=" + @(slaveState), datatype: "json", success: function (result) {
    546546      for(i = 0; i < result.length; i++) {
    547547        window[ "@(dataName)Data" + i].push([(new Date()).getTime(), result[i]]);
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Content/Site.css

    r11252 r11259  
    560560}
    561561
     562label.slaveStateFilter {
     563  margin-left: 2%;
     564  display: inline;
     565}
     566
     567select.slaveStateFilter {
     568  margin-top: 2%;
     569  display: inline;
     570}
     571
    562572/* User Page Styles*/
    563573#TasksContainer div[id^="Task"] {
     
    579589}
    580590
    581 .chartContainer > label:first-of-type, .moreTaskInfo {
     591.chartContainer > label:first-of-type:not(.slaveStateFilter), .moreTaskInfo {
    582592  margin-bottom: 1%;
    583593  display: block;
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Controllers/ChartDataController.cs

    r11255 r11259  
    9292    }
    9393
    94     public JsonResult CurrentCpuUtilization()
     94    public JsonResult CurrentCpuUtilization(string state)
    9595    {
    9696      using (var db = new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString))
     
    102102                               on clients.ResourceId equals resource.ResourceId
    103103                             where clients.ExpirationTime == null &&
    104                              (resource.SlaveState == SlaveState.Calculating || resource.SlaveState == SlaveState.Idle)
     104                             (state == "All") ||
     105                             (state == "Online") &&
     106                             (client.SlaveState == SlaveState.Idle || client.SlaveState == SlaveState.Calculating ) ||
     107                             (state == "Available") &&
     108                             (client.SlaveState == SlaveState.Idle)
    105109                             select new { client.ClientId, client.CpuUtilization, client.Time })
    106110                             .OrderBy(c => c.Time).GroupBy(c => c.ClientId).ToList();
     
    113117    }
    114118
    115     public JsonResult CurrentCores()
     119    public JsonResult CurrentCores(string state)
    116120    {
    117121      using (var db = new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString))
     
    123127                             on clients.ResourceId equals resource.ResourceId
    124128                            where clients.ExpirationTime == null &&
    125                             (resource.SlaveState == SlaveState.Calculating || resource.SlaveState == SlaveState.Idle)
     129                            (state == "All") ||
     130                            (state == "Online") &&
     131                            (client.SlaveState == SlaveState.Idle || client.SlaveState == SlaveState.Calculating) ||
     132                            (state == "Available") &&
     133                            (client.SlaveState == SlaveState.Idle)
    126134                            select new { client.ClientId, client.NumTotalCores, client.NumUsedCores, client.Time })
    127135                            .OrderBy(c => c.Time).GroupBy(c => c.ClientId).ToList();
     
    135143    }
    136144
    137     public JsonResult CurrentMemory()
     145    public JsonResult CurrentMemory(string state)
    138146    {
    139147      using (var db = new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString))
     
    145153                              on clients.ResourceId equals resource.ResourceId
    146154                            where clients.ExpirationTime == null &&
    147                             (resource.SlaveState == SlaveState.Calculating || resource.SlaveState == SlaveState.Idle)
     155                            (state == "All") ||
     156                            (state == "Online") &&
     157                            (client.SlaveState == SlaveState.Idle || client.SlaveState == SlaveState.Calculating) ||
     158                            (state == "Available") &&
     159                            (client.SlaveState == SlaveState.Idle)
    148160                            select new { client.ClientId, client.TotalMemory, client.UsedMemory, client.Time })
    149161                            .OrderBy(c => c.Time).GroupBy(c => c.ClientId).ToList();
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Scripts/CollapsingSection.js

    r11222 r11259  
    33$(".collapse").click(function () {
    44  if ($(this).html() == "-") {
    5     $(this).parent().children("canvas, div, fieldset, label, .chartContainer, a, table").fadeOut();
     5    $(this).parent().children("canvas, div, fieldset, label, .chartContainer, a, table, select").fadeOut();
    66    $(this).html("+");
    77  }
    88  else {
    9     $(this).parent().children("canvas, div, fieldset, label, .chartContainer, a, table").fadeIn();
     9    $(this).parent().children("canvas, div, fieldset, label, .chartContainer, a, table, select").fadeIn();
    1010    $(this).html("-");
    1111  }
     
    1818  var jqCaller = $(caller);
    1919  if (jqCaller.html() == "-") {
    20     jqCaller.parent().children("canvas, div, fieldset, label, .chartContainer, a, table").fadeOut();
     20    jqCaller.parent().children("canvas, div, fieldset, label, .chartContainer, a, table, select").fadeOut();
    2121    jqCaller.html("+");
    2222  }
    2323  else {
    24     jqCaller.parent().children("canvas, div, fieldset, label, .chartContainer, a, table").fadeIn();
     24    jqCaller.parent().children("canvas, div, fieldset, label, .chartContainer, a, table, select").fadeIn();
    2525    jqCaller.html("-");
    2626  }
     
    3030  section */
    3131function CollapsedByDefault(caller) {
    32   $(caller).parent().children("canvas, div, fieldset, label, .chartContainer, a, table").hide();
     32  $(caller).parent().children("canvas, div, fieldset, label, .chartContainer, a, table, select").hide();
    3333}
    3434
     
    3636function OpenOnError(caller) {
    3737  var jqCaller = $(caller);
    38   jqCaller.parent().children("canvas, div, fieldset, label, .chartContainer, a, table").fadeIn();
     38  jqCaller.parent().children("canvas, div, fieldset, label, .chartContainer, a, table, select").fadeIn();
    3939  jqCaller.parent().children("button").html("-");
    4040}
     
    4545  var jqCaller = $(caller);
    4646  if (jqCaller.html() == "-") {
    47     jqCaller.parent().children("canvas, div, fieldset, label, .chartContainer, .tabSection, a, table").hide();
     47    jqCaller.parent().children("canvas, div, fieldset, label, .chartContainer, .tabSection, a, table, select").hide();
    4848    jqCaller.html("+");
    4949  }
    5050  else {
    51     jqCaller.parent().children("canvas, div, fieldset, label, .chartContainer, .tabSection, a, table").show();
     51    jqCaller.parent().children("canvas, div, fieldset, label, .chartContainer, .tabSection, a, table, select").show();
    5252    jqCaller.html("-");
    5353  }
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Views/Home/Index.cshtml

    r11252 r11259  
    3131  <h1 class="title">Current Hive Status</h1>
    3232  <button class="collapse">-</button>
     33  <label class="slaveStateFilter">Slave State:</label>
     34  <select id="SlaveState" class="slaveStateFilter">
     35    <option>All</option>
     36    <option selected="selected">Online</option>
     37    <option>Available</option>
     38  </select>
    3339  <div id="CurrentCPUUtilization"></div>
    3440  <div id="CurrentTotalUsedCores"></div>
     
    104110        RefreshCharts();
    105111      });
     112
     113     
    106114    });
    107115
     
    116124
    117125    $(document).ready(function () {
     126      var slaveState;
     127      slaveState = $("#SlaveState").val();
     128
     129      $("#SlaveState").change(function () {
     130        slaveState = $(this).val();
     131      });
     132
    118133      @ChartHelper.UserTasks(Url.Action("UserTasks", "ChartData"), "section.currentStats", "Calculating");
    119134      @ChartHelper.UserTasks(Url.Action("UserTasks", "ChartData"), "section.currentStats", "Waiting");
     
    121136      @ChartHelper.SetStreamingProperties(1000,20,5)
    122137
    123       @ChartHelper.CreateStreamChart("CurrentCPU", "CurrentCPUUtilization",Url.Action("CurrentCpuUtilization","ChartData"),"Current CPU Utilization","%.2f%%",100.00)
    124       @ChartHelper.CreateStreamChart("CurrentCores", "CurrentTotalUsedCores",Url.Action("CurrentCores","ChartData"),"Current Total vs. Used Cores")
    125       @ChartHelper.CreateStreamChart("CurrentMemory", "CurrentTotalUsedMemory",Url.Action("CurrentMemory","ChartData"),"Current Total vs. Used Memory")
     138      @ChartHelper.CreateStreamChart("CurrentCPU", "CurrentCPUUtilization",Url.Action("CurrentCpuUtilization","ChartData"),"Current CPU Utilization","slaveState","%.2f%%",100.00)
     139      @ChartHelper.CreateStreamChart("CurrentCores", "CurrentTotalUsedCores",Url.Action("CurrentCores","ChartData"),"Current Total vs. Used Cores","slaveState")
     140      @ChartHelper.CreateStreamChart("CurrentMemory", "CurrentTotalUsedMemory",Url.Action("CurrentMemory","ChartData"),"Current Total vs. Used Memory","slaveState")
    126141
    127142      function DoUpdate() {
    128         @ChartHelper.UpdateStreamChart("CurrentCPU","CurrentCPUUtilization", Url.Action("CurrentCpuUtilization","ChartData"),"FixedY")
    129         @ChartHelper.UpdateStreamChart("CurrentCores","CurrentTotalUsedCores", Url.Action("CurrentCores","ChartData"))
    130         @ChartHelper.UpdateStreamChart("CurrentMemory","CurrentTotalUsedMemory", Url.Action("CurrentMemory","ChartData"))
     143        @ChartHelper.UpdateStreamChart("CurrentCPU","CurrentCPUUtilization", Url.Action("CurrentCpuUtilization","ChartData"),"slaveState","FixedY")
     144        @ChartHelper.UpdateStreamChart("CurrentCores","CurrentTotalUsedCores", Url.Action("CurrentCores","ChartData"),"slaveState")
     145        @ChartHelper.UpdateStreamChart("CurrentMemory","CurrentTotalUsedMemory", Url.Action("CurrentMemory","ChartData"),"slaveState")
    131146        setTimeout(DoUpdate, refreshRate);
    132147      }
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive/3.3/HiveStatisticsGenerator.cs

    r11223 r11259  
    200200          TotalMemory = s.Slave.Memory ?? 0,
    201201          CpuUtilization = s.Slave.CpuUtilization,
     202          SlaveState = s.Slave.SlaveState,
    202203          TotalTimeIdle = s.Slave.SlaveState == SlaveState.Idle && s.Slave.IsAllowedToCalculate
    203204                                  ? duration : 0.0,
Note: See TracChangeset for help on using the changeset viewer.