Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/25/15 18:34:40 (10 years ago)
Author:
dglaser
Message:

#2388:

HeuristicLab.Services.Hive.DataAccess-3.3:

  • updated daos
  • changed statistics database schema
  • updated HiveStatisticsGenerator

HeuristicLab.Services.WebApp.Statistics-3.3:

  • added jobs, client and user page
Location:
branches/HiveStatistics/sources
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • branches/HiveStatistics/sources

  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/HiveStatistics/DimClientDao.cs

    r12468 r12516  
    3737      return Table.SingleOrDefault(x => x.Id == id);
    3838    }
    39     public IQueryable<DimClient> GetRecentlyAddedClients() {
     39    public IQueryable<DimClient> GetActiveClients() {
    4040      return Table.Where(x => x.ExpirationTime == null);
     41    }
     42
     43    public IQueryable<DimClient> GetExpiredClients() {
     44      return Table.Where(x => x.ExpirationTime != null);
    4145    }
    4246
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/HiveStatistics/DimJobDao.cs

    r12477 r12516  
    3535      return Table.Where(x => x.UserId == id);
    3636    }
     37
     38    public IQueryable<DimJob> GetNotCompletedJobs() {
     39      return Table.Where(x => x.DateCompleted == null);
     40    }
     41
     42    public IQueryable<DimJob> GetCompletedJobs() {
     43      return Table.Where(x => x.DateCompleted != null);
     44    }
    3745  }
    3846}
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/HiveStatistics/FactClientInfoDao.cs

    r12468 r12516  
    5959             };
    6060    }
     61
     62    public IQueryable<FactClientInfo> GetByClientId(Guid id) {
     63      return Table.Where(x => x.ClientId == id);
     64    }
    6165  }
    6266}
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/HiveStatistics/FactTaskDao.cs

    r12477 r12516  
    4444    }
    4545
     46    public DateTime? GetLastCompletedTaskFromJob(Guid id) {
     47      return Table.Where(x => x.JobId == id && x.EndTime != null).Max(x => x.EndTime);
     48    }
     49
     50    public IQueryable<FactTask> GetByClientId(Guid id) {
     51      return Table.Where(x => x.LastClientId == id);
     52    }
     53
    4654    public override void Delete(IEnumerable<Guid> ids) {
    4755      string paramIds = string.Join(",", ids.Select(x => string.Format("'{0}'", x)));
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/Daos/TaskDao.cs

    r12468 r12516  
    3535      return Table.Where(x => !x.IsParentTask);
    3636    }
     37
     38    public IQueryable<Task> GetAllByJobId(Guid id) {
     39      return Table.Where(x => x.JobId == id);
     40    }
    3741  }
    3842}
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml

    r12484 r12516  
    218218      <Column Name="ResourceGroupId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="true" />
    219219      <Column Name="ResourceGroup2Id" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="true" />
     220      <Column Name="GroupName" Type="System.String" CanBeNull="true" />
     221      <Column Name="GroupName2" Type="System.String" CanBeNull="true" />
    220222      <Association Name="DimClient_FactTask" Member="FactTasks" ThisKey="Id" OtherKey="LastClientId" Type="FactTask" />
    221223      <Association Name="DimClient_FactClientInfo" Member="FactClientInfos" ThisKey="Id" OtherKey="ClientId" Type="FactClientInfo" />
     
    250252      <Column Name="JobName" Type="System.String" DbType="VarChar(MAX) NOT NULL" CanBeNull="false" />
    251253      <Column Name="UserName" Type="System.String" DbType="VarChar(MAX) NOT NULL" CanBeNull="false" />
    252       <Column Name="DateCreated" Type="System.DateTime" CanBeNull="false" />
     254      <Column Name="DateCreated" Type="System.DateTime" DbType="DateTime NOT NULL" CanBeNull="false" />
     255      <Column Name="TotalTasks" Type="System.Int32" DbType="INT NOT NULL" CanBeNull="false" />
     256      <Column Name="CompletedTasks" Type="System.Int32" DbType="INT NOT NULL" CanBeNull="false" />
     257      <Column Name="DateCompleted" Type="System.DateTime" DbType="DateTime NULL" CanBeNull="true" />
    253258      <Association Name="DimJob_FactTask" Member="FactTasks" ThisKey="JobId" OtherKey="JobId" Type="FactTask" />
    254259    </Type>
     
    283288      <Column Name="CpuUtilization" Type="System.Double" DbType="Float NOT NULL" CanBeNull="false" />
    284289      <Column Name="TotalTimeIdle" Type="System.Double" DbType="Float NOT NULL" CanBeNull="false" />
    285       <Column Name="TotalTimeCalculating" Type="System.Double" DbType="Float NOT NULL" CanBeNull="false" />
    286       <Column Name="TotalTimeTransferring" Type="System.Double" DbType="Float NOT NULL" CanBeNull="false" />
    287290      <Column Name="TotalTimeOffline" Type="System.Double" DbType="Float NOT NULL" CanBeNull="false" />
    288291      <Column Name="TotalTimeUnavailable" Type="System.Double" DbType="Float NOT NULL" CanBeNull="false" />
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml.layout

    r12484 r12516  
    11<?xml version="1.0" encoding="utf-8"?>
    2 <ordesignerObjectsDiagram dslVersion="1.0.0.0" absoluteBounds="0, 0, 24.25, 17.5" name="HiveDataContext">
     2<ordesignerObjectsDiagram dslVersion="1.0.0.0" absoluteBounds="0, 0, 24.25, 17.875" name="HiveDataContext">
    33  <DataContextMoniker Name="/HiveDataContext" />
    44  <nestedChildShapes>
     
    247247      </nestedChildShapes>
    248248    </classShape>
    249     <classShape Id="b5b919c2-4efc-4f09-8f52-9d541a11e961" absoluteBounds="4.625, 15.25, 2, 1.9631982421875023">
     249    <classShape Id="b5b919c2-4efc-4f09-8f52-9d541a11e961" absoluteBounds="4.625, 15.25, 2, 2.3478011067708344">
    250250      <DataClassMoniker Name="/HiveDataContext/DimClient" />
    251251      <nestedChildShapes>
    252         <elementListCompartment Id="30f62a7b-0b16-404e-b972-fb12bfe978dd" absoluteBounds="4.6400000000000006, 15.71, 1.9700000000000002, 1.4031982421875" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     252        <elementListCompartment Id="30f62a7b-0b16-404e-b972-fb12bfe978dd" absoluteBounds="4.6400000000000006, 15.71, 1.9700000000000002, 1.7878011067708333" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    253253      </nestedChildShapes>
    254254    </classShape>
     
    259259      </nestedChildShapes>
    260260    </classShape>
    261     <classShape Id="e0cb8641-a75e-4b9f-beda-3218c56938b1" absoluteBounds="8.125, 9.125, 2, 1.7708968098958344">
     261    <classShape Id="e0cb8641-a75e-4b9f-beda-3218c56938b1" absoluteBounds="8.125, 8.25, 2, 2.3478011067708344">
    262262      <DataClassMoniker Name="/HiveDataContext/DimJob" />
    263263      <nestedChildShapes>
    264         <elementListCompartment Id="6b9e8260-7e4b-4357-9c26-eebebfd69504" absoluteBounds="8.14, 9.585, 1.9700000000000002, 1.2108968098958333" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     264        <elementListCompartment Id="6b9e8260-7e4b-4357-9c26-eebebfd69504" absoluteBounds="8.14, 8.71, 1.9700000000000002, 1.7878011067708333" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    265265      </nestedChildShapes>
    266266    </classShape>
     
    277277      </nestedChildShapes>
    278278    </classShape>
    279     <classShape Id="053a5cff-b18a-4ee5-8d43-48ed5c5dcfad" absoluteBounds="2.625, 11, 2, 3.5016097005208326">
     279    <classShape Id="053a5cff-b18a-4ee5-8d43-48ed5c5dcfad" absoluteBounds="2.625, 11, 2, 3.1170068359375005">
    280280      <DataClassMoniker Name="/HiveDataContext/FactClientInfo" />
    281281      <nestedChildShapes>
    282         <elementListCompartment Id="0a1cc913-6636-455c-95b3-302f533527db" absoluteBounds="2.6399999999999997, 11.46, 1.9700000000000002, 2.941609700520833" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
     282        <elementListCompartment Id="0a1cc913-6636-455c-95b3-302f533527db" absoluteBounds="2.6399999999999997, 11.46, 1.9700000000000002, 2.5570068359375" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
    283283      </nestedChildShapes>
    284284    </classShape>
     
    290290      </nodes>
    291291    </associationConnector>
    292     <associationConnector edgePoints="[(8.5 : 10.8958968098958); (8.5 : 11.25)]" fixedFrom="NotFixed" fixedTo="NotFixed">
     292    <associationConnector edgePoints="[(8.5 : 10.5978011067708); (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.99218625 : 15.25); (5.99218625 : 12.1788329785157); (4.625 : 12.1788329785157)]" fixedFrom="NotFixed" fixedTo="NotFixed">
     299    <associationConnector edgePoints="[(5.6249975 : 15.25); (5.6249975 : 12.5585034179688); (4.625 : 12.5585034179688)]" fixedFrom="Algorithm" fixedTo="Algorithm">
    300300      <AssociationMoniker Name="/HiveDataContext/DimClient/DimClient_FactClientInfo" />
    301301      <nodes>
     
    311311      </nodes>
    312312    </associationConnector>
    313     <associationConnector edgePoints="[(1.59375 : 10.0689925130208); (1.59375 : 12.7508048502604); (2.625 : 12.7508048502604)]" fixedFrom="NotFixed" fixedTo="NotFixed">
     313    <associationConnector edgePoints="[(1.59375 : 10.0689925130208); (1.59375 : 12.5585034179688); (2.625 : 12.5585034179688)]" fixedFrom="Algorithm" fixedTo="Algorithm">
    314314      <AssociationMoniker Name="/HiveDataContext/DimUser/DimUser_FactClientInfo" />
    315315      <nodes>
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.designer.cs

    r12484 r12516  
    46194619    private System.Nullable<System.Guid> _ResourceGroup2Id;
    46204620   
     4621    private string _GroupName;
     4622   
     4623    private string _GroupName2;
     4624   
    46214625    private EntitySet<FactTask> _FactTasks;
    46224626   
     
    46394643    partial void OnResourceGroup2IdChanging(System.Nullable<System.Guid> value);
    46404644    partial void OnResourceGroup2IdChanged();
     4645    partial void OnGroupNameChanging(string value);
     4646    partial void OnGroupNameChanged();
     4647    partial void OnGroupName2Changing(string value);
     4648    partial void OnGroupName2Changed();
    46414649    #endregion
    46424650   
     
    47644772          this.SendPropertyChanged("ResourceGroup2Id");
    47654773          this.OnResourceGroup2IdChanged();
     4774        }
     4775      }
     4776    }
     4777   
     4778    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_GroupName")]
     4779    public string GroupName
     4780    {
     4781      get
     4782      {
     4783        return this._GroupName;
     4784      }
     4785      set
     4786      {
     4787        if ((this._GroupName != value))
     4788        {
     4789          this.OnGroupNameChanging(value);
     4790          this.SendPropertyChanging();
     4791          this._GroupName = value;
     4792          this.SendPropertyChanged("GroupName");
     4793          this.OnGroupNameChanged();
     4794        }
     4795      }
     4796    }
     4797   
     4798    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_GroupName2")]
     4799    public string GroupName2
     4800    {
     4801      get
     4802      {
     4803        return this._GroupName2;
     4804      }
     4805      set
     4806      {
     4807        if ((this._GroupName2 != value))
     4808        {
     4809          this.OnGroupName2Changing(value);
     4810          this.SendPropertyChanging();
     4811          this._GroupName2 = value;
     4812          this.SendPropertyChanged("GroupName2");
     4813          this.OnGroupName2Changed();
    47664814        }
    47674815      }
     
    53595407    private System.DateTime _DateCreated;
    53605408   
     5409    private int _TotalTasks;
     5410   
     5411    private int _CompletedTasks;
     5412   
     5413    private System.Nullable<System.DateTime> _DateCompleted;
     5414   
    53615415    private EntitySet<FactTask> _FactTasks;
    53625416   
     
    53755429    partial void OnDateCreatedChanging(System.DateTime value);
    53765430    partial void OnDateCreatedChanged();
     5431    partial void OnTotalTasksChanging(int value);
     5432    partial void OnTotalTasksChanged();
     5433    partial void OnCompletedTasksChanging(int value);
     5434    partial void OnCompletedTasksChanged();
     5435    partial void OnDateCompletedChanging(System.Nullable<System.DateTime> value);
     5436    partial void OnDateCompletedChanged();
    53775437    #endregion
    53785438   
     
    54635523    }
    54645524   
    5465     [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DateCreated")]
     5525    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DateCreated", DbType="DateTime NOT NULL")]
    54665526    public System.DateTime DateCreated
    54675527    {
     
    54795539          this.SendPropertyChanged("DateCreated");
    54805540          this.OnDateCreatedChanged();
     5541        }
     5542      }
     5543    }
     5544   
     5545    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalTasks", DbType="INT NOT NULL")]
     5546    public int TotalTasks
     5547    {
     5548      get
     5549      {
     5550        return this._TotalTasks;
     5551      }
     5552      set
     5553      {
     5554        if ((this._TotalTasks != value))
     5555        {
     5556          this.OnTotalTasksChanging(value);
     5557          this.SendPropertyChanging();
     5558          this._TotalTasks = value;
     5559          this.SendPropertyChanged("TotalTasks");
     5560          this.OnTotalTasksChanged();
     5561        }
     5562      }
     5563    }
     5564   
     5565    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompletedTasks", DbType="INT NOT NULL")]
     5566    public int CompletedTasks
     5567    {
     5568      get
     5569      {
     5570        return this._CompletedTasks;
     5571      }
     5572      set
     5573      {
     5574        if ((this._CompletedTasks != value))
     5575        {
     5576          this.OnCompletedTasksChanging(value);
     5577          this.SendPropertyChanging();
     5578          this._CompletedTasks = value;
     5579          this.SendPropertyChanged("CompletedTasks");
     5580          this.OnCompletedTasksChanged();
     5581        }
     5582      }
     5583    }
     5584   
     5585    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DateCompleted", DbType="DateTime NULL")]
     5586    public System.Nullable<System.DateTime> DateCompleted
     5587    {
     5588      get
     5589      {
     5590        return this._DateCompleted;
     5591      }
     5592      set
     5593      {
     5594        if ((this._DateCompleted != value))
     5595        {
     5596          this.OnDateCompletedChanging(value);
     5597          this.SendPropertyChanging();
     5598          this._DateCompleted = value;
     5599          this.SendPropertyChanged("DateCompleted");
     5600          this.OnDateCompletedChanged();
    54815601        }
    54825602      }
     
    58765996   
    58775997    private double _TotalTimeIdle;
    5878    
    5879     private double _TotalTimeCalculating;
    5880    
    5881     private double _TotalTimeTransferring;
    58825998   
    58835999    private double _TotalTimeOffline;
     
    59156031    partial void OnTotalTimeIdleChanging(double value);
    59166032    partial void OnTotalTimeIdleChanged();
    5917     partial void OnTotalTimeCalculatingChanging(double value);
    5918     partial void OnTotalTimeCalculatingChanged();
    5919     partial void OnTotalTimeTransferringChanging(double value);
    5920     partial void OnTotalTimeTransferringChanged();
    59216033    partial void OnTotalTimeOfflineChanging(double value);
    59226034    partial void OnTotalTimeOfflineChanged();
     
    61276239    }
    61286240   
    6129     [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalTimeCalculating", DbType="Float NOT NULL")]
    6130     public double TotalTimeCalculating
    6131     {
    6132       get
    6133       {
    6134         return this._TotalTimeCalculating;
    6135       }
    6136       set
    6137       {
    6138         if ((this._TotalTimeCalculating != value))
    6139         {
    6140           this.OnTotalTimeCalculatingChanging(value);
    6141           this.SendPropertyChanging();
    6142           this._TotalTimeCalculating = value;
    6143           this.SendPropertyChanged("TotalTimeCalculating");
    6144           this.OnTotalTimeCalculatingChanged();
    6145         }
    6146       }
    6147     }
    6148    
    6149     [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalTimeTransferring", DbType="Float NOT NULL")]
    6150     public double TotalTimeTransferring
    6151     {
    6152       get
    6153       {
    6154         return this._TotalTimeTransferring;
    6155       }
    6156       set
    6157       {
    6158         if ((this._TotalTimeTransferring != value))
    6159         {
    6160           this.OnTotalTimeTransferringChanging(value);
    6161           this.SendPropertyChanging();
    6162           this._TotalTimeTransferring = value;
    6163           this.SendPropertyChanged("TotalTimeTransferring");
    6164           this.OnTotalTimeTransferringChanged();
    6165         }
    6166       }
    6167     }
    6168    
    61696241    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalTimeOffline", DbType="Float NOT NULL")]
    61706242    public double TotalTimeOffline
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/SQL Scripts/Initialize Hive Database.sql

    r12484 r12516  
    217217    [ResourceGroupId]  UNIQUEIDENTIFIER NULL,
    218218    [ResourceGroup2Id] UNIQUEIDENTIFIER NULL,
     219  [GroupName]        VARCHAR (MAX)    NULL,
     220  [GroupName2]       VARCHAR (MAX)    NULL,
    219221    CONSTRAINT [PK_DimClient] PRIMARY KEY CLUSTERED ([Id] ASC)
    220222);
    221223CREATE TABLE [statistics].[DimJob] (
    222     [JobId]       UNIQUEIDENTIFIER NOT NULL,
    223     [UserId]      UNIQUEIDENTIFIER NOT NULL,
    224     [JobName]     VARCHAR (MAX)    NOT NULL,
    225     [UserName]    VARCHAR (MAX)    NOT NULL,
    226     [DateCreated] DATETIME       NOT NULL,
     224    [JobId]          UNIQUEIDENTIFIER NOT NULL,
     225    [UserId]         UNIQUEIDENTIFIER NOT NULL,
     226    [JobName]        VARCHAR (MAX)    NOT NULL,
     227    [UserName]       VARCHAR (MAX)    NOT NULL,
     228    [DateCreated]    DATETIME     NOT NULL,
     229    [TotalTasks]     INT              NOT NULL,
     230    [CompletedTasks] INT              NOT NULL,
     231    [DateCompleted]  DATETIME     NULL,
    227232    CONSTRAINT [PK_DimJob] PRIMARY KEY CLUSTERED ([JobId] ASC)
    228233);
     
    243248    [SlaveState]      VarChar(15)    NOT NULL,
    244249    [TotalTimeIdle]         FLOAT (53)       NOT NULL,
    245     [TotalTimeCalculating]  FLOAT (53)       NOT NULL,
    246     [TotalTimeTransferring] FLOAT (53)       NOT NULL,
    247250    [TotalTimeOffline]      FLOAT (53)       NOT NULL,
    248251    [TotalTimeUnavailable]  FLOAT (53)       NOT NULL,
Note: See TracChangeset for help on using the changeset viewer.