コード例 #1
0
        public IEnumerator <IStepContext <float> > GetEnumerator()
        {
            this.Stats = new Statistics();
            while (this.Stats.ElapsedMs < this.Duration.TotalMilliseconds)
            {
                var step = new PerfTestStep
                {
                    EventId         = $"{Tag}-{this.Stats.Messages}",
                    DecisionContext = this.Contexts[this.Stats.Messages % this.RingSize],
                    Outcome         = this.Stats.Messages % 100
                };

                yield return(step);

                this.Stats.Update(step);
            }
        }
コード例 #2
0
 public virtual void afterStep(PerfTestStep step, PerfTestRun run)
 {
     // nothing to do
 }
コード例 #3
0
 public virtual void beforeStep(PerfTestStep step, PerfTestRun run)
 {
     // nothing to do
 }
コード例 #4
0
        public virtual void afterStep(PerfTestStep step, PerfTestRun run)
        {
            IList <SqlStatementLog> loggedStatements = StatementLogSqlSession.stopLogging();

            run.logStepResult(loggedStatements);
        }
コード例 #5
0
 public virtual void beforeStep(PerfTestStep step, PerfTestRun run)
 {
     StatementLogSqlSession.startLogging();
 }
コード例 #6
0
 public void Update(PerfTestStep step)
 {
     Bytes += Encoding.UTF8.GetByteCount(step.DecisionContext) + Encoding.UTF8.GetByteCount(step.EventId);
     Messages++;
     ElapsedMs = Timer.ElapsedMilliseconds;
 }