Skip to content

PerfBenchmark with TestMode.Measurement throws error without assertion #475

@DR9885

Description

@DR9885

PerfBenchmark with TestMode.Measurement throws error without assertion. Isn't testmode measurment meant to be use with no assertions. Is there any way we can disable this check?

Example:

    public class TempBenchmark
    {
        private Counter _counter;

        [PerfSetup]
        public void Setup(BenchmarkContext context)
        {
            _counter = context.GetCounter("Event");
        }

        [PerfBenchmark(RunMode = RunMode.Iterations, TestMode = TestMode.Measurement)]
        // [CounterThroughputAssertion("Event", MustBe.GreaterThan, 0.20d)]
        public void Iterations()
        {
            _counter.Increment();
        }
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions