コード例 #1
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="MeasurementContext{TSeed}"/> class.
        /// </summary>
        /// <param name="parameters">
        ///     Performance scenario parameters.
        /// </param>
        /// <param name="seed">
        ///     Seed that may be used by the performance scenario.
        /// </param>
        /// <param name="generator">
        ///     Test object generator.
        /// </param>
        /// <param name="progress">
        ///     Measurement progress reporter.
        /// </param>
        public MeasurementContext(MeasurementParameters <TSeed> parameters, IGenerator generator, IProgress <ProgressPercentage> progress)
        {
            if (object.ReferenceEquals(parameters, null))
            {
                throw new ArgumentNullException(nameof(parameters));
            }

            if (object.ReferenceEquals(generator, null))
            {
                throw new ArgumentNullException(nameof(generator));
            }

            this.parameters = parameters;
            this.generator  = generator;
            this.progress   = progress;
        }
コード例 #2
0
 public MeasurementContextFactory(MeasurementParameters <TSeed> parameters, IProgress <ProgressPercentageIncrease> progress, IGeneratorFactory generatorFactory)
 {
     this.parameters       = parameters;
     this.progress         = progress;
     this.generatorFactory = generatorFactory;
 }
コード例 #3
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="PerformanceSample{TSeed}"/> class.
 /// </summary>
 /// <param name="parameters">
 ///     Performance measurement parameters.
 /// </param>
 /// <param name="executionTimes">
 ///     Reference to the read-only list of execution times scored by the corresponding scenarios.
 /// </param>
 public PerformanceSample(MeasurementParameters <TSeed> parameters, IReadOnlyList <long> executionTimes)
 {
     this.parameters     = parameters;
     this.executionTimes = executionTimes;
 }