Beispiel #1
0
        //private void CreatePerfCounter(string server)
        //{
        //    PerfCounter perfCounter = new PerfCounter();
        //    perfCounter.Server = server;

        //    perfCounter.ProcessedCounters.Add(new PerformanceCounter("BizTalk:Messaging", "Documents processed/Sec", "BBW_TxHost", server));

        //    perfCounter.ReceivedCounters.Add(new PerformanceCounter("BizTalk:Messaging", "Documents received/Sec", "BBW_RxHost", server));

        //    perfCounter.CPUCounters.Add(new PerformanceCounter("Processor", "% Processor Time", "_Total", server));

        //    PerfCounters.Add(perfCounter);
        //}
        protected void RaiseCompleteEvent(object sender, LoadGenStopEventArgs e)
        {
            if (OnComplete != null)
            {
                OnComplete(sender, e);
            }
        }
Beispiel #2
0
        private void LoadGenStopped(object sender, LoadGenStopEventArgs e)
        {
            TimeSpan span1 = e.LoadGenStopTime.Subtract(e.LoadGenStartTime);

            _ctx.LogInfo("FilesSent: " + e.NumFilesSent);
            _ctx.LogInfo("StartTime: " + e.LoadGenStartTime);
            _ctx.LogInfo("StopTime:  " + e.LoadGenStopTime);
            _ctx.LogInfo("DeltaTime: " + span1.TotalSeconds + "Secs.");
            _ctx.LogInfo("Rate:      " + ((e.NumFilesSent) / span1.TotalSeconds));

            _bExitApp = true;
        }
Beispiel #3
0
        private void LoadGen_Stopped(object sender, LoadGenStopEventArgs e)
        {
            _allLoadGenStopEventArgs.Add(e);
            _numberOfLoadGenStopped++;

            if (_numberOfLoadGenClients == _numberOfLoadGenStopped)
            {
                try
                {
                    long     numberOfMsgsSent = _allLoadGenStopEventArgs.Sum(l => l.NumFilesSent);
                    DateTime startTime        = _allLoadGenStopEventArgs.Min(l => l.LoadGenStartTime);
                    DateTime stopTime         = e.LoadGenStopTime;

                    LoadGenStopEventArgs ea = new LoadGenStopEventArgs(numberOfMsgsSent, startTime, stopTime);
                    RaiseCompleteEvent(sender, ea);
                }
                catch (Exception)
                {
                    RaiseCompleteEvent(this, new LoadGenStopEventArgs(1, DateTime.Now, DateTime.Now));
                }
            }
        }
        private void LoadGenStopped(object sender, LoadGenStopEventArgs e)
        {
            TimeSpan span1 = e.LoadGenStopTime.Subtract(e.LoadGenStartTime);
            _ctx.LogInfo("FilesSent: " + e.NumFilesSent);
            _ctx.LogInfo("StartTime: " + e.LoadGenStartTime);
            _ctx.LogInfo("StopTime:  " + e.LoadGenStopTime);
            _ctx.LogInfo("DeltaTime: " + span1.TotalSeconds + "Secs.");
            _ctx.LogInfo("Rate:      " + ((e.NumFilesSent) / span1.TotalSeconds));

            _bExitApp = true;
        }