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); } }
public virtual void afterStep(PerfTestStep step, PerfTestRun run) { // nothing to do }
public virtual void beforeStep(PerfTestStep step, PerfTestRun run) { // nothing to do }
public virtual void afterStep(PerfTestStep step, PerfTestRun run) { IList <SqlStatementLog> loggedStatements = StatementLogSqlSession.stopLogging(); run.logStepResult(loggedStatements); }
public virtual void beforeStep(PerfTestStep step, PerfTestRun run) { StatementLogSqlSession.startLogging(); }
public void Update(PerfTestStep step) { Bytes += Encoding.UTF8.GetByteCount(step.DecisionContext) + Encoding.UTF8.GetByteCount(step.EventId); Messages++; ElapsedMs = Timer.ElapsedMilliseconds; }