Changeset 6958


Ignore:
Timestamp:
11/07/11 16:48:16 (8 years ago)
Author:
ascheibe
Message:

#1233 fixed an arithmetic overflow when gathering statistics on job deletion

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  
    155155    <Type Name="DeletedJobStatistics">
    156156      <Column Name="UserId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" CanBeNull="false" />
    157       <Column Name="ExecutionTimeMs" Storage="_ExecutionTime" Type="System.Double" DbType="float NOT NULL" CanBeNull="false" />
    158       <Column Name="ExecutionTimeMsFinishedJobs" Storage="_ExecutionTimeFinishedJobs" Type="System.Double" DbType="float NOT NULL" CanBeNull="false" />
    159       <Column Name="StartToEndTimeMs" 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" />
    160160      <Column Name="DeletedJobStatisticsId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />
    161161    </Type>
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml.layout

    r6893 r6958  
    5757      </nestedChildShapes>
    5858    </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">
    6060      <nodes>
    6161        <classShapeMoniker Id="706a4581-6daf-4e71-ae2a-87d50b27a051" />
     
    6363      </nodes>
    6464    </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">
    6666      <nodes>
    6767        <classShapeMoniker Id="706a4581-6daf-4e71-ae2a-87d50b27a051" />
     
    6969      </nodes>
    7070    </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">
    7272      <AssociationMoniker Name="/HiveDataContext/Resource/Resource_AssignedResource" />
    7373      <nodes>
     
    121121      </nestedChildShapes>
    122122    </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">
    124124      <AssociationMoniker Name="/HiveDataContext/Resource/Resource_StateLog" />
    125125      <nodes>
     
    172172      </nodes>
    173173    </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">
    175175      <AssociationMoniker Name="/HiveDataContext/Resource/Resource_Downtime" />
    176176      <nodes>
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.designer.cs

    r6893 r6958  
    33// <auto-generated>
    44//     This code was generated by a tool.
    5 //     Runtime Version:4.0.30319.237
     5//     Runtime Version:4.0.30319.239
    66//
    77//     Changes to this file may cause incorrect behavior and will be lost if
     
    34283428    partial void OnUserIdChanging(System.Guid value);
    34293429    partial void OnUserIdChanged();
    3430     partial void OnExecutionTimeMsChanging(double value);
    3431     partial void OnExecutionTimeMsChanged();
    3432     partial void OnExecutionTimeMsFinishedJobsChanging(double value);
    3433     partial void OnExecutionTimeMsFinishedJobsChanged();
    3434     partial void OnStartToEndTimeMsChanging(double value);
    3435     partial void OnStartToEndTimeMsChanged();
     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();
    34363436    partial void OnDeletedJobStatisticsIdChanging(System.Guid value);
    34373437    partial void OnDeletedJobStatisticsIdChanged();
     
    34643464   
    34653465    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ExecutionTime", DbType="float NOT NULL")]
    3466     public double ExecutionTimeMs
     3466    public double ExecutionTimeS
    34673467    {
    34683468      get
     
    34743474        if ((this._ExecutionTime != value))
    34753475        {
    3476           this.OnExecutionTimeMsChanging(value);
     3476          this.OnExecutionTimeSChanging(value);
    34773477          this.SendPropertyChanging();
    34783478          this._ExecutionTime = value;
    3479           this.SendPropertyChanged("ExecutionTimeMs");
    3480           this.OnExecutionTimeMsChanged();
     3479          this.SendPropertyChanged("ExecutionTimeS");
     3480          this.OnExecutionTimeSChanged();
    34813481        }
    34823482      }
     
    34843484   
    34853485    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ExecutionTimeFinishedJobs", DbType="float NOT NULL")]
    3486     public double ExecutionTimeMsFinishedJobs
     3486    public double ExecutionTimeSFinishedJobs
    34873487    {
    34883488      get
     
    34943494        if ((this._ExecutionTimeFinishedJobs != value))
    34953495        {
    3496           this.OnExecutionTimeMsFinishedJobsChanging(value);
     3496          this.OnExecutionTimeSFinishedJobsChanging(value);
    34973497          this.SendPropertyChanging();
    34983498          this._ExecutionTimeFinishedJobs = value;
    3499           this.SendPropertyChanged("ExecutionTimeMsFinishedJobs");
    3500           this.OnExecutionTimeMsFinishedJobsChanged();
     3499          this.SendPropertyChanged("ExecutionTimeSFinishedJobs");
     3500          this.OnExecutionTimeSFinishedJobsChanged();
    35013501        }
    35023502      }
     
    35043504   
    35053505    [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StartToEndTime", DbType="float NOT NULL")]
    3506     public double StartToEndTimeMs
     3506    public double StartToEndTimeS
    35073507    {
    35083508      get
     
    35143514        if ((this._StartToEndTime != value))
    35153515        {
    3516           this.OnStartToEndTimeMsChanging(value);
     3516          this.OnStartToEndTimeSChanging(value);
    35173517          this.SendPropertyChanging();
    35183518          this._StartToEndTime = value;
    3519           this.SendPropertyChanged("StartToEndTimeMs");
    3520           this.OnStartToEndTimeMsChanged();
     3519          this.SendPropertyChanged("StartToEndTimeS");
     3520          this.OnStartToEndTimeSChanged();
    35213521        }
    35223522      }
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/SQL Scripts/Initialize Hive Database.sql

    r6893 r6958  
    115115CREATE TABLE [DeletedJobStatistics](
    116116  [UserId] UniqueIdentifier NOT NULL,
    117   [ExecutionTimeMs] float NOT NULL,
    118   [ExecutionTimeMsFinishedJobs] float NOT NULL,
    119   [StartToEndTimeMs] float NOT NULL,
     117  [ExecutionTimeS] float NOT NULL,
     118  [ExecutionTimeSFinishedJobs] float NOT NULL,
     119  [StartToEndTimeS] float NOT NULL,
    120120  [DeletedJobStatisticsId] UniqueIdentifier NOT NULL,
    121121  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  
    189189BEGIN
    190190  -- add statistics
    191   INSERT INTO dbo.DeletedJobStatistics (UserId, ExecutionTimeMs, ExecutionTimeMsFinishedJobs, StartToEndTimeMs)
     191  INSERT INTO dbo.DeletedJobStatistics (UserId, ExecutionTimeS, ExecutionTimeSFinishedJobs, StartToEndTimeS)
    192192  SELECT
    193193    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 StartToEndMs
     194    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
    197197  FROM
    198198    deleted j,
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.3/HiveDao.cs

    r6946 r6958  
    800800                                               select new {
    801801                                                 UserId = g.Key,
    802                                                  ExecutionTime = TimeSpan.FromMilliseconds(g.Select(x => x.ExecutionTimeMs).Sum()),
    803                                                  ExecutionTimeFinishedJobs = TimeSpan.FromMilliseconds(g.Select(x => x.ExecutionTimeMsFinishedJobs).Sum()),
    804                                                  StartToEndTime = TimeSpan.FromMilliseconds(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())
    805805                                               };
    806806        foreach (var item in deletedJobsExecutionTimesByUsers) {
Note: See TracChangeset for help on using the changeset viewer.