protected RecycleStation() : base("m03", "ddp08") { this.Reurl = string.Empty; this.myNotifier = new StatisticNotifier(); this.myEvent = new UpdateStatistics(); }
protected ProductSendsIntegral() : base("m02", "spp02") { this.saleStatus = ProductSaleStatus.OnSale; this.LocalUrl = string.Empty; this.myNotifier = new StatisticNotifier(); this.myEvent = new UpdateStatistics(); }
protected SellerAlreadySent() : base("m03", "ddp05") { this.Reurl = string.Empty; this.myNotifier = new StatisticNotifier(); this.myEvent = new UpdateStatistics(); }
protected ProductZero() : base("m02", "spp10") { this.saleStatus = ProductSaleStatus.All; this.LocalUrl = string.Empty; this.myNotifier = new StatisticNotifier(); this.myEvent = new UpdateStatistics(); }
public void ParsTournamentMinusMultistringXml() { ConfigurationManager.AppSettings["CreateDatabase"] = "0"; string sXmlString = ""; DatabaseCache.EnsureDatabaseCache(); BetDomainMap.EnsureInstance(); using (var reader = new StreamReader("dc.xml")) { sXmlString = reader.ReadToEnd(); } var srlc = LineSerializeHelper.StringToObject <SportRadarLineContainer>(sXmlString); UpdateStatistics us = new UpdateStatistics(); var fsr = LineSr.SyncRoutines(eUpdateType.PreMatches, string.Format("SportRadar Pre-Match Update. DataSyncCacheId = {0}", 0), false, us, delegate(object objParam) { return(ProviderHelper.MergeFromSportRadarLineContainer(srlc, 0)); }); Assert.AreEqual(fsr, eFileSyncResult.Succeeded); var instance = LineSr.Instance.AllObjects.Groups.Where(x => x.Value.SvrGroupId == 5263).First(); Assert.AreEqual(8, instance.Value.Strings.Count); Assert.AreEqual("Pro A", instance.Value.GetDisplayName("EN")); }
protected ProductOnStock() : base("m02", "spp03") { this.saleStatus = ProductSaleStatus.OnStock; this.LocalUrl = string.Empty; this.myNotifier = new StatisticNotifier(); this.myEvent = new UpdateStatistics(); }
protected WaitBuyerPay() : base("m03", "ddp14") { this.myNotifier = new StatisticNotifier(); this.myEvent = new UpdateStatistics(); this.Reurl = string.Empty; }
protected ManageOrder() : base("m03", "ddp03") { this.Reurl = string.Empty; this.myNotifier = new StatisticNotifier(); this.myEvent = new UpdateStatistics(); }
public ManageMembers() : base("m04", "hyp02") { this.mstatus = Globals.RequestQueryStr("MemberStatus"); this.ValidSmsNum = "0"; this.addHideCss = string.Empty; this.myNotifier = new StatisticNotifier(); this.myEvent = new UpdateStatistics(); this.reUrl = string.Empty; }
protected MemberAmountApply() : base("m04", "hyp11") { this.RequestStartTime = ""; this.RequestEndTime = ""; this.StoreName = ""; this.DrawMinNum = 1; this.DrawPayType = ""; this.myNotifier = new StatisticNotifier(); this.myEvent = new UpdateStatistics(); }
protected BalanceDrawApplyList() : base("m05", "fxp09") { this.RequestStartTime = ""; this.RequestEndTime = ""; this.StoreName = ""; this.DrawMinNum = 1; this.DrawPayType = ""; this.myNotifier = new StatisticNotifier(); this.myEvent = new UpdateStatistics(); }
protected RecycleStationDetail() : base("m03", "ddp08") { this.myNotifier = new StatisticNotifier(); this.myEvent = new UpdateStatistics(); this.orderId = Globals.RequestQueryStr("OrderId"); this.reurl = string.Empty; this.ProcessClass2 = string.Empty; this.ProcessClass3 = string.Empty; this.ProcessClass4 = string.Empty; }
protected OrderDetails() : base("m03", "00000") { this.myNotifier = new StatisticNotifier(); this.myEvent = new UpdateStatistics(); this.orderId = Globals.RequestQueryStr("OrderId"); this.comCode = ""; this.reurl = string.Empty; this.ProcessClass2 = string.Empty; this.ProcessClass3 = string.Empty; this.ProcessClass4 = string.Empty; }
protected DistributorList() : base("m05", "fxp03") { this.StoreName = ""; this.Grade = "0"; this.Status = "0"; this.RealName = ""; this.CellPhone = ""; this.MicroSignal = ""; this.myNotifier = new StatisticNotifier(); this.myEvent = new UpdateStatistics(); }
public static void Update(GameTime time) { float elapsedTime = ((float)time.ElapsedGameTime.Milliseconds) / 1000f; UpdateStatistics cycleStatistics = new UpdateStatistics(); cycleStatistics.timeElapsed = elapsedTime; lastUpdateStatistics.Add(cycleStatistics); if (lastUpdateStatistics.Count >= updateLogLength) { lastUpdateStatistics.RemoveAt(0); } float timesum = 0; for (int i = 0; i < lastUpdateStatistics.Count; i++) { timesum += lastUpdateStatistics[i].timeElapsed; } updatesPerSec = 1f / (timesum / lastUpdateStatistics.Count); //DrawStatistics if (second != time.TotalGameTime.Seconds) { second = time.TotalGameTime.Seconds; DrawStatistics drawCycleStatistics = new DrawStatistics(); drawCycleStatistics.drawsThisSec = drawCount; drawCount = 0; LastDrawStatistics.Add(drawCycleStatistics); if (LastDrawStatistics.Count >= drawLogLength) { LastDrawStatistics.RemoveAt(0); } int drawSum = 0; for (int i = 0; i < LastDrawStatistics.Count; i++) { drawSum += LastDrawStatistics[i].drawsThisSec; } if (LastDrawStatistics.Count != 0) { fps = (float)drawSum / (float)LastDrawStatistics.Count; } } }
public void LogStatistics() { if (m_EnableUpdateStatistics) { System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder(); stringBuilder.AppendLine("Update Statistics:"); for (int iUpdate = 0; iUpdate < m_UpdateStatisticss.Length; iUpdate++) { UpdateStatistics iterUpdate = m_UpdateStatisticss[iUpdate]; stringBuilder.AppendLine(string.Format("{0}: Count:{1} AvgTicks:{2:f2}" , (UpdateType)iUpdate , iterUpdate.UpdateCount , iterUpdate.UpdateTicks / (double)iterUpdate.UpdateCount)); } Debug.Log(stringBuilder.ToString()); } }
public Form1() { InitializeComponent(); iterations = 0; received_overall = 0; received_overall_this_time = 0; initialStamp = 0; waiting4Receive = false; fileWriteLock = new object(); LogUtility.LogUtility.FileName = Environment.CurrentDirectory + "\\log.txt"; LogUtility.LogUtility.SetLevel(ModuleLogLevel); updateStatistics = new UpdateStatistics(Update_Statistics); updateStatistics2 = new UpdateStatistics2(Update_Statistics2); if (File.Exists(LogUtility.LogUtility.FileName)) { File.Delete(LogUtility.LogUtility.FileName); } requestToConnectSent = false; }
public void ParseOutright() { ConfigurationManager.AppSettings["CreateDatabase"] = "0"; string sXmlString = ""; DatabaseCache.EnsureDatabaseCache(); BetDomainMap.EnsureInstance(); using (var reader = new StreamReader("groupsLanguages.xml")) { sXmlString = reader.ReadToEnd(); } var srlc = LineSerializeHelper.StringToObject <SportRadarLineContainer>(sXmlString); UpdateStatistics us = new UpdateStatistics(); var fsr = LineSr.SyncRoutines(eUpdateType.PreMatches, string.Format("SportRadar Pre-Match Update. DataSyncCacheId = {0}", 0), false, us, delegate(object objParam) { return(ProviderHelper.MergeFromSportRadarLineContainer(srlc, 0)); }); Assert.AreEqual(fsr, eFileSyncResult.Succeeded); //matches using (var reader = new StreamReader("content.xml")) { sXmlString = reader.ReadToEnd(); } srlc = LineSerializeHelper.StringToObject <SportRadarLineContainer>(sXmlString); us = new UpdateStatistics(); fsr = LineSr.SyncRoutines(eUpdateType.PreMatches, string.Format("SportRadar Pre-Match Update. DataSyncCacheId = {0}", 0), false, us, delegate(object objParam) { return(ProviderHelper.MergeFromSportRadarLineContainer(srlc, 0)); }); Assert.AreEqual(fsr, eFileSyncResult.Succeeded); var instance = LineSr.Instance.AllObjects.Matches.Where(x => x.Value.MatchId == 1004106).First(); Assert.AreEqual("RHL - Podium1", instance.Value.GetOutrightDisplayName("EN")); Assert.AreEqual("RHL - Podium1", instance.Value.MatchView.Name); }
public static eFileSyncResult SyncRoutines(eUpdateType eut, string sProviderDescription, bool bUseDatabase, UpdateStatistics us, DelegateMerge dm) { Debug.Assert(dm != null); CheckTime ct = new CheckTime(true, "SyncRoutines(UseDatabase={0}) entered", bUseDatabase); /* * if (DalStationSettings.Instance.EnableRunProcessControl) * { * string sInfo = SystemControl.GetSystemInfo() + "\r\n" + ProcessControl.Current.ToDetailedString(); * m_logger.Info(sInfo); * #if DEBUG * m_logger.Info(ProcessControl.Current.GetThreadSummary()); #endif * * ct.AddEvent("Control completed"); * } */ try { eFileSyncResult fsr = eFileSyncResult.Failed; lock (m_oUpdateLocker) { ct.AddEvent("Inside of lock"); LineSr.Instance.NewOrChangedObjects.UnsetPropertiesChanged(); LineSr.Instance.NewOrChangedObjects.Clear(); bool bProcessUpdateSucceeded = false; lock (m_oReadLocker) { ct.AddEvent("Cache Update Started"); bProcessUpdateSucceeded = dm(null); ct.AddEvent("Cache Update Completed ({0}, {1})", LineSr.Instance.NewOrChangedObjects.Count, LineSr.Instance.ObjectsToRemove.Count); } if (bUseDatabase) { // We use database to store Live Data fsr = DataCopy.UpdateDatabase(ConnectionManager.GetConnection(), eut, sProviderDescription, us); ct.AddEvent("Database Update Completed"); if (fsr == eFileSyncResult.Succeeded) { LineSr.Instance.NewOrChangedObjects.NotifyPropertiesChanged(); DatabaseCache.Instance.AddNewObjectsAfterCommit(); DatabaseCache.Instance.RemoveObjectsAfterCommit(); LineSr.Instance.ObjectsToRemove.Clear(); ct.AddEvent("Routines Completed (fsr=Succeeded)"); } else { ct.AddEvent("Routines Completed (fsr=Skipped or Failed)"); } } else { // We DON'T use database to store Live Data fsr = eFileSyncResult.Succeeded; LineSr.Instance.NewOrChangedObjects.NotifyPropertiesChanged(); ct.AddEvent("Routines Completed"); } if (fsr == eFileSyncResult.Succeeded && bProcessUpdateSucceeded) { ct.AddEvent("ProcessDataSqlUpdateSucceeded() Completed"); } } return(fsr); } catch (Exception excp) { LineSr.Instance.ObjectsToRemove.Clear(); m_logger.Excp(excp, "SyncRoutines(eUpdateType={0}, sProviderDescription='{1}') ERROR", eut, sProviderDescription); ct.AddEvent("Exception Completed"); ct.Error(m_logger); } finally { ct.AddEvent("Completed"); ct.Info(m_logger); } return(eFileSyncResult.Failed); }
protected NotifierDemo() : base("", "") { this.myNotifier = new StatisticNotifier(); this.myEvent = new UpdateStatistics(); }
public static void Update(GameTime time) { float elapsedTime = ((float)time.ElapsedGameTime.Milliseconds) / 1000f; UpdateStatistics cycleStatistics = new UpdateStatistics(); cycleStatistics.timeElapsed = elapsedTime; lastUpdateStatistics.Add(cycleStatistics); if (lastUpdateStatistics.Count >= updateLogLength) lastUpdateStatistics.RemoveAt(0); float timesum = 0; for (int i = 0; i < lastUpdateStatistics.Count; i++) timesum += lastUpdateStatistics[i].timeElapsed; updatesPerSec = 1f/(timesum / lastUpdateStatistics.Count); //DrawStatistics if (second != time.TotalGameTime.Seconds) { second = time.TotalGameTime.Seconds; DrawStatistics drawCycleStatistics = new DrawStatistics(); drawCycleStatistics.drawsThisSec = drawCount; drawCount = 0; LastDrawStatistics.Add(drawCycleStatistics); if (LastDrawStatistics.Count >= drawLogLength) LastDrawStatistics.RemoveAt(0); int drawSum = 0; for (int i = 0; i < LastDrawStatistics.Count; i++) drawSum += LastDrawStatistics[i].drawsThisSec; if(LastDrawStatistics.Count != 0) fps = (float)drawSum / (float)LastDrawStatistics.Count; } }
//protected string wid; public ManageMembers() : base("m04", "hyp02") { this.ValidSmsNum = "0"; this.myNotifier = new StatisticNotifier(); this.myEvent = new UpdateStatistics(); }