Type of Test What Is Measured What Is Excluded
Class-based Code in each method tagged
with the Test attribute
- Code in the methods
with the following
attributes:
TestMethodSetup,
TestMethodTeardown,
TestClassSetup, and
TestClassTeardown - Shared fixture setup and
teardown - Measured estimate of the
framework overhead
Class-based deriving from
matlab.perftest.TestC
ase and using
startMeasuring and
stopMeasuring methods
Code between calls to
startMeasuring and
stopMeasuring in each
method tagged with the
Test attribute
- Code outside of the
startMeasuring/
stopMeasuring
boundary - Measured estimate of the
framework overhead
Class-based deriving from
matlab.perftest.TestC
ase and using the
keepMeasuring method
Code inside each
keepMeasuring-while
loop in each method tagged
with the Test attribute
- Code outside of the
keepMeasuring-while
boundary - Measured estimate of the
framework overhead
Types of Time Experiments
You can create two types of time experiments.
- A frequentist time experiment collects a variable number of measurements to achieve
a specified margin of error and confidence level. Use a frequentist time experiment to
define statistical objectives for your measurement samples. Generate this experiment
using the runperf function or the limitingSamplingError static method of the
TimeExperiment class. - A fixed time experiment collects a fixed number of measurements. Use a fixed time
experiment to measure first-time costs of your code or to take explicit control of your
sample size. Generate this experiment using the withFixedSampleSize static
method of the TimeExperiment class.
Overview of Performance Testing Framework