Changeset 6958
- Timestamp:
- 11/07/11 16:48:16 (13 years ago)
- Location:
- branches/HeuristicLab.Hive-3.4/sources
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml
r6893 r6958 155 155 <Type Name="DeletedJobStatistics"> 156 156 <Column Name="UserId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" CanBeNull="false" /> 157 <Column Name="ExecutionTime Ms" Storage="_ExecutionTime" Type="System.Double" DbType="float NOT NULL" CanBeNull="false" />158 <Column Name="ExecutionTime MsFinishedJobs" Storage="_ExecutionTimeFinishedJobs" Type="System.Double" DbType="float NOT NULL" CanBeNull="false" />159 <Column Name="StartToEndTime Ms" Storage="_StartToEndTime" Type="System.Double" DbType="float NOT NULL" CanBeNull="false" />157 <Column Name="ExecutionTimeS" Storage="_ExecutionTime" Type="System.Double" DbType="float NOT NULL" CanBeNull="false" /> 158 <Column Name="ExecutionTimeSFinishedJobs" Storage="_ExecutionTimeFinishedJobs" Type="System.Double" DbType="float NOT NULL" CanBeNull="false" /> 159 <Column Name="StartToEndTimeS" Storage="_StartToEndTime" Type="System.Double" DbType="float NOT NULL" CanBeNull="false" /> 160 160 <Column Name="DeletedJobStatisticsId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" /> 161 161 </Type> -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml.layout
r6893 r6958 57 57 </nestedChildShapes> 58 58 </classShape> 59 <inheritanceConnector edgePoints="[(11.25 : 2.34259724934896); (10.875 : 2.34259724934896)]" fixedFrom=" Algorithm" fixedTo="Algorithm" TargetRelationshipDomainClassId="7a7fe09e-e9ef-4b01-9ff3-bde95e827b62">59 <inheritanceConnector edgePoints="[(11.25 : 2.34259724934896); (10.875 : 2.34259724934896)]" fixedFrom="NotFixed" fixedTo="NotFixed" TargetRelationshipDomainClassId="7a7fe09e-e9ef-4b01-9ff3-bde95e827b62"> 60 60 <nodes> 61 61 <classShapeMoniker Id="706a4581-6daf-4e71-ae2a-87d50b27a051" /> … … 63 63 </nodes> 64 64 </inheritanceConnector> 65 <inheritanceConnector edgePoints="[(13.25 : 1.40469482421875); (13.5 : 1.40469482421875)]" fixedFrom=" Algorithm" fixedTo="Algorithm" TargetRelationshipDomainClassId="7a7fe09e-e9ef-4b01-9ff3-bde95e827b62">65 <inheritanceConnector edgePoints="[(13.25 : 1.40469482421875); (13.5 : 1.40469482421875)]" fixedFrom="NotFixed" fixedTo="NotFixed" TargetRelationshipDomainClassId="7a7fe09e-e9ef-4b01-9ff3-bde95e827b62"> 66 66 <nodes> 67 67 <classShapeMoniker Id="706a4581-6daf-4e71-ae2a-87d50b27a051" /> … … 69 69 </nodes> 70 70 </inheritanceConnector> 71 <associationConnector edgePoints="[(12.015626 : 2.77089680989583); (12.015626 : 4.59699625651042); (10.875 : 4.59699625651042)]" fixedFrom=" Algorithm" fixedTo="Algorithm">71 <associationConnector edgePoints="[(12.015626 : 2.77089680989583); (12.015626 : 4.59699625651042); (10.875 : 4.59699625651042)]" fixedFrom="NotFixed" fixedTo="NotFixed"> 72 72 <AssociationMoniker Name="/HiveDataContext/Resource/Resource_AssignedResource" /> 73 73 <nodes> … … 121 121 </nestedChildShapes> 122 122 </classShape> 123 <associationConnector edgePoints="[(11.25 : 1.64004662467448); (10.9375 : 1.64004662467448); (10.9375 : 0.6875); (2.75 : 0.6875); (2.75 : 1)]" fixedFrom=" Algorithm" fixedTo="Algorithm">123 <associationConnector edgePoints="[(11.25 : 1.64004662467448); (10.9375 : 1.64004662467448); (10.9375 : 0.6875); (2.75 : 0.6875); (2.75 : 1)]" fixedFrom="NotFixed" fixedTo="NotFixed"> 124 124 <AssociationMoniker Name="/HiveDataContext/Resource/Resource_StateLog" /> 125 125 <nodes> … … 172 172 </nodes> 173 173 </associationConnector> 174 <associationConnector edgePoints="[(12.664065 : 2.77089680989583); (12.664065 : 3.7131987421875); (13.5 : 3.7131987421875)]" fixedFrom=" Algorithm" fixedTo="Algorithm">174 <associationConnector edgePoints="[(12.664065 : 2.77089680989583); (12.664065 : 3.7131987421875); (13.5 : 3.7131987421875)]" fixedFrom="NotFixed" fixedTo="NotFixed"> 175 175 <AssociationMoniker Name="/HiveDataContext/Resource/Resource_Downtime" /> 176 176 <nodes> -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.designer.cs
r6893 r6958 3 3 // <auto-generated> 4 4 // This code was generated by a tool. 5 // Runtime Version:4.0.30319.23 75 // Runtime Version:4.0.30319.239 6 6 // 7 7 // Changes to this file may cause incorrect behavior and will be lost if … … 3428 3428 partial void OnUserIdChanging(System.Guid value); 3429 3429 partial void OnUserIdChanged(); 3430 partial void OnExecutionTime MsChanging(double value);3431 partial void OnExecutionTime MsChanged();3432 partial void OnExecutionTime MsFinishedJobsChanging(double value);3433 partial void OnExecutionTime MsFinishedJobsChanged();3434 partial void OnStartToEndTime MsChanging(double value);3435 partial void OnStartToEndTime MsChanged();3430 partial void OnExecutionTimeSChanging(double value); 3431 partial void OnExecutionTimeSChanged(); 3432 partial void OnExecutionTimeSFinishedJobsChanging(double value); 3433 partial void OnExecutionTimeSFinishedJobsChanged(); 3434 partial void OnStartToEndTimeSChanging(double value); 3435 partial void OnStartToEndTimeSChanged(); 3436 3436 partial void OnDeletedJobStatisticsIdChanging(System.Guid value); 3437 3437 partial void OnDeletedJobStatisticsIdChanged(); … … 3464 3464 3465 3465 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ExecutionTime", DbType="float NOT NULL")] 3466 public double ExecutionTime Ms3466 public double ExecutionTimeS 3467 3467 { 3468 3468 get … … 3474 3474 if ((this._ExecutionTime != value)) 3475 3475 { 3476 this.OnExecutionTime MsChanging(value);3476 this.OnExecutionTimeSChanging(value); 3477 3477 this.SendPropertyChanging(); 3478 3478 this._ExecutionTime = value; 3479 this.SendPropertyChanged("ExecutionTime Ms");3480 this.OnExecutionTime MsChanged();3479 this.SendPropertyChanged("ExecutionTimeS"); 3480 this.OnExecutionTimeSChanged(); 3481 3481 } 3482 3482 } … … 3484 3484 3485 3485 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ExecutionTimeFinishedJobs", DbType="float NOT NULL")] 3486 public double ExecutionTime MsFinishedJobs3486 public double ExecutionTimeSFinishedJobs 3487 3487 { 3488 3488 get … … 3494 3494 if ((this._ExecutionTimeFinishedJobs != value)) 3495 3495 { 3496 this.OnExecutionTime MsFinishedJobsChanging(value);3496 this.OnExecutionTimeSFinishedJobsChanging(value); 3497 3497 this.SendPropertyChanging(); 3498 3498 this._ExecutionTimeFinishedJobs = value; 3499 this.SendPropertyChanged("ExecutionTime MsFinishedJobs");3500 this.OnExecutionTime MsFinishedJobsChanged();3499 this.SendPropertyChanged("ExecutionTimeSFinishedJobs"); 3500 this.OnExecutionTimeSFinishedJobsChanged(); 3501 3501 } 3502 3502 } … … 3504 3504 3505 3505 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StartToEndTime", DbType="float NOT NULL")] 3506 public double StartToEndTime Ms3506 public double StartToEndTimeS 3507 3507 { 3508 3508 get … … 3514 3514 if ((this._StartToEndTime != value)) 3515 3515 { 3516 this.OnStartToEndTime MsChanging(value);3516 this.OnStartToEndTimeSChanging(value); 3517 3517 this.SendPropertyChanging(); 3518 3518 this._StartToEndTime = value; 3519 this.SendPropertyChanged("StartToEndTime Ms");3520 this.OnStartToEndTime MsChanged();3519 this.SendPropertyChanged("StartToEndTimeS"); 3520 this.OnStartToEndTimeSChanged(); 3521 3521 } 3522 3522 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/SQL Scripts/Initialize Hive Database.sql
r6893 r6958 115 115 CREATE TABLE [DeletedJobStatistics]( 116 116 [UserId] UniqueIdentifier NOT NULL, 117 [ExecutionTime Ms] float NOT NULL,118 [ExecutionTime MsFinishedJobs] float NOT NULL,119 [StartToEndTime Ms] float NOT NULL,117 [ExecutionTimeS] float NOT NULL, 118 [ExecutionTimeSFinishedJobs] float NOT NULL, 119 [StartToEndTimeS] float NOT NULL, 120 120 [DeletedJobStatisticsId] UniqueIdentifier NOT NULL, 121 121 CONSTRAINT [PK_DeletedJobStatistics] PRIMARY KEY ([DeletedJobStatisticsId]) -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/SQL Scripts/Prepare Hive Database.sql
r6723 r6958 189 189 BEGIN 190 190 -- add statistics 191 INSERT INTO dbo.DeletedJobStatistics (UserId, ExecutionTime Ms, ExecutionTimeMsFinishedJobs, StartToEndTimeMs)191 INSERT INTO dbo.DeletedJobStatistics (UserId, ExecutionTimeS, ExecutionTimeSFinishedJobs, StartToEndTimeS) 192 192 SELECT 193 193 he.OwnerUserId AS UserId, 194 SUM(j.ExecutionTimeMs) AS ExecutionTimeMs,195 ISNULL(SUM(CASE ls.State WHEN 'Finished' THEN j.ExecutionTimeMs END), 0) AS ExecutionTimeMsFinishedJobs,196 ISNULL(SUM(CASE ls.State WHEN 'Finished' THEN DATEDIFF( MS,fs.DateTime,ls.DateTime) ELSE 0 END), 0) AS StartToEndMs194 ROUND(SUM(j.ExecutionTimeMs) / 1000, 0) AS ExecutionTimeS, 195 ROUND(ISNULL(SUM(CASE ls.State WHEN 'Finished' THEN j.ExecutionTimeMs END), 0) / 1000, 0) AS ExecutionTimeSFinishedJobs, 196 ISNULL(SUM(CASE ls.State WHEN 'Finished' THEN DATEDIFF(s, fs.DateTime, ls.DateTime) ELSE 0 END), 0) AS StartToEndTimeS 197 197 FROM 198 198 deleted j, -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.3/HiveDao.cs
r6946 r6958 800 800 select new { 801 801 UserId = g.Key, 802 ExecutionTime = TimeSpan.From Milliseconds(g.Select(x => x.ExecutionTimeMs).Sum()),803 ExecutionTimeFinishedJobs = TimeSpan.From Milliseconds(g.Select(x => x.ExecutionTimeMsFinishedJobs).Sum()),804 StartToEndTime = TimeSpan.From Milliseconds(g.Select(x => x.StartToEndTimeMs).Sum())802 ExecutionTime = TimeSpan.FromSeconds(g.Select(x => x.ExecutionTimeS).Sum()), 803 ExecutionTimeFinishedJobs = TimeSpan.FromSeconds(g.Select(x => x.ExecutionTimeSFinishedJobs).Sum()), 804 StartToEndTime = TimeSpan.FromSeconds(g.Select(x => x.StartToEndTimeS).Sum()) 805 805 }; 806 806 foreach (var item in deletedJobsExecutionTimesByUsers) {
Note: See TracChangeset
for help on using the changeset viewer.