public void Calculate(DeltaSyncBatchResults deltaSyncBatch)
 {
     base.Calculate(deltaSyncBatch.Objects, deltaSyncBatch.Links);
     this.ContextCount = deltaSyncBatch.Contexts.Count <DirectoryContext>();
     if (DeltaSyncBatchStatistics.< Calculate > o__SiteContainer0.< > p__Site1 == null)
     {
         DeltaSyncBatchStatistics.< Calculate > o__SiteContainer0.< > p__Site1 = CallSite <Func <CallSite, object, SizeAndCountStatistics> > .Create(Binder.Convert(CSharpBinderFlags.None, typeof(SizeAndCountStatistics), typeof(DeltaSyncBatchStatistics)));
     }
     this.ContextSize = DeltaSyncBatchStatistics.< Calculate > o__SiteContainer0.< > p__Site1.Target(DeltaSyncBatchStatistics.< Calculate > o__SiteContainer0.< > p__Site1, SizeAndCountStatistics.Calculate(from o in deltaSyncBatch.Contexts
                                                                                                                                                                                                             select SyncBatchStatisticsBase.SerializedSize(o)));
     this.ContextsPerSecond     = (double)this.ContextCount / base.ResponseTime.TotalSeconds;
     this.ContextBytesPerSecond = (double)this.ContextSize.Sum / base.ResponseTime.TotalSeconds;
 }
Beispiel #2
0
 public DeltaSyncBatchResults()
 {
     this.Stats = new DeltaSyncBatchStatistics();
 }
 public virtual void Calculate(IEnumerable <DirectoryObject> Objects, IEnumerable <DirectoryLink> Links)
 {
     this.ObjectCount = Objects.Count <DirectoryObject>();
     this.LinkCount   = Links.Count <DirectoryLink>();
     if (SyncBatchStatisticsBase.< Calculate > o__SiteContainer0.< > p__Site1 == null)
     {
         SyncBatchStatisticsBase.< Calculate > o__SiteContainer0.< > p__Site1 = CallSite <Func <CallSite, object, SizeAndCountStatistics> > .Create(Binder.Convert(CSharpBinderFlags.None, typeof(SizeAndCountStatistics), typeof(SyncBatchStatisticsBase)));
     }
     this.ObjectSize = SyncBatchStatisticsBase.< Calculate > o__SiteContainer0.< > p__Site1.Target(SyncBatchStatisticsBase.< Calculate > o__SiteContainer0.< > p__Site1, SizeAndCountStatistics.Calculate(from o in Objects
                                                                                                                                                                                                          select SyncBatchStatisticsBase.SerializedSize(o)));
     this.ObjectsPerSecond     = (double)this.ObjectCount / this.ResponseTime.TotalSeconds;
     this.ObjectBytesPerSecond = (double)this.ObjectSize.Sum / this.ResponseTime.TotalSeconds;
     if (SyncBatchStatisticsBase.< Calculate > o__SiteContainer0.< > p__Site2 == null)
     {
         SyncBatchStatisticsBase.< Calculate > o__SiteContainer0.< > p__Site2 = CallSite <Func <CallSite, object, SizeAndCountStatistics> > .Create(Binder.Convert(CSharpBinderFlags.None, typeof(SizeAndCountStatistics), typeof(SyncBatchStatisticsBase)));
     }
     this.LinkSize = SyncBatchStatisticsBase.< Calculate > o__SiteContainer0.< > p__Site2.Target(SyncBatchStatisticsBase.< Calculate > o__SiteContainer0.< > p__Site2, SizeAndCountStatistics.Calculate(from o in Links
                                                                                                                                                                                                        select SyncBatchStatisticsBase.SerializedSize(o)));
     this.LinksPerSecond     = (double)this.LinkCount / this.ResponseTime.TotalSeconds;
     this.LinkBytesPerSecond = (double)this.LinkSize.Sum / this.ResponseTime.TotalSeconds;
     this.ObjectTypes        = (from o in Objects
                                group o by o.GetType().Name).ToDictionary((IGrouping <string, DirectoryObject> g) => g.Key, (IGrouping <string, DirectoryObject> g) => g.Count <DirectoryObject>());
 }
Beispiel #4
0
 public void Calculate(TenantSyncBatchResults tenantSyncBatch)
 {
     base.Calculate(tenantSyncBatch.Objects, tenantSyncBatch.Links);
     this.ErrorCount = tenantSyncBatch.Errors.Count <DirectoryObjectError>();
     if (TenantSyncBatchStatistics.< Calculate > o__SiteContainer0.< > p__Site1 == null)
     {
         TenantSyncBatchStatistics.< Calculate > o__SiteContainer0.< > p__Site1 = CallSite <Func <CallSite, object, SizeAndCountStatistics> > .Create(Binder.Convert(CSharpBinderFlags.None, typeof(SizeAndCountStatistics), typeof(TenantSyncBatchStatistics)));
     }
     this.ErrorSize = TenantSyncBatchStatistics.< Calculate > o__SiteContainer0.< > p__Site1.Target(TenantSyncBatchStatistics.< Calculate > o__SiteContainer0.< > p__Site1, SizeAndCountStatistics.Calculate(from o in tenantSyncBatch.Errors
                                                                                                                                                                                                             select SyncBatchStatisticsBase.SerializedSize(o)));
     this.ErrorsPerSecond     = (double)this.ErrorCount / base.ResponseTime.TotalSeconds;
     this.ErrorBytesPerSecond = (double)this.ErrorSize.Sum / base.ResponseTime.TotalSeconds;
 }
 public TenantSyncBatchResults()
 {
     this.Stats = new TenantSyncBatchStatistics();
 }