Corrade::TestSuite::Tester::TesterConfiguration class

Tester configuration.

Constructors, destructors, conversion operators

TesterConfiguration(const TesterConfiguration&)
Copy constructor.
TesterConfiguration(TesterConfiguration&&) noexcept
Move constructor.

Public functions

auto operator=(const TesterConfiguration&) -> TesterConfiguration&
Copy assignment.
auto operator=(TesterConfiguration&&) -> TesterConfiguration& noexcept
Move assignment.
auto skippedArgumentPrefixes() const -> Containers::Array<Containers::StringView>
Skipped argument prefixes.
auto setSkippedArgumentPrefixes(std::initializer_list<Containers::StringView> prefixes) -> TesterConfiguration&
Set skipped argument prefixes.
auto setSkippedArgumentPrefixes(std::initializer_list<const char*> prefixes) -> TesterConfiguration&
auto cpuScalingGovernorFile() const -> Containers::StringView
Where to check for active CPU scaling governor.
auto setCpuScalingGovernorFile(Containers::StringView filename) -> TesterConfiguration&
Set where to check for active CPU scaling governor.

Function documentation

TesterConfiguration& Corrade::TestSuite::Tester::TesterConfiguration::setSkippedArgumentPrefixes(std::initializer_list<Containers::StringView> prefixes)

Set skipped argument prefixes.

Useful to allow passing command-line arguments elsewhere without having the tester complaining about them.

Views that have both Containers::StringViewFlag::Global and Containers::StringViewFlag::NullTerminated set (such as coming from a Containers::StringView literal) will be used without having to make an owned string copy internally.

TesterConfiguration& Corrade::TestSuite::Tester::TesterConfiguration::setSkippedArgumentPrefixes(std::initializer_list<const char*> prefixes)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Containers::StringView Corrade::TestSuite::Tester::TesterConfiguration::cpuScalingGovernorFile() const

Where to check for active CPU scaling governor.

TesterConfiguration& Corrade::TestSuite::Tester::TesterConfiguration::setCpuScalingGovernorFile(Containers::StringView filename)

Set where to check for active CPU scaling governor.

Running benchmarks on a system with dynamic CPU scaling makes the measurements very noisy. If that's detected, a warning is printed in the output. Defaults to /sys/devices/system/cpu/cpu{}/cpufreq/scaling_governor, where {} is replaced with CPU ID; if the file doesn't exist, no check is done.

A view that has both Containers::StringViewFlag::Global and Containers::StringViewFlag::NullTerminated set (such as coming from a Containers::StringView literal) will be used without having to make an owned string copy internally.