This table summarizes the differences between the frequentist and fixed time
experiments.Frequentist time
experimentFixed time experimentWarm-up measurements 4 by default, but
configurable through
TimeExperiment.limiti
ngSamplingError0 by default, but
configurable through
TimeExperiment.withFi
xedSampleSize
Number of samples Between 4 and 256 by
default, but configurable
through
TimeExperiment.limiti
ngSamplingErrorDefined during experiment
constructionRelative margin of error 5% by default, but
configurable through
TimeExperiment.limiti
ngSamplingErrorNot applicableConfidence level 95% by default, but
configurable through
TimeExperiment.limiti
ngSamplingErrorNot applicableFramework behavior for
invalid test resultStops measuring a test and
moves to the next oneCollects specified number of
samplesWrite Performance Tests with Measurement Boundaries
If your class-based tests derive from matlab.perftest.TestCase instead of
matlab.unittest.TestCase, then you can use the startMeasuring and
stopMeasuring methods or the keepMeasuring method multiple times to define
boundaries for performance test measurements. If a test method has multiple calls to
startMeasuring, stopMeasuring and keepMeasuring, then the performance
framework accumulates and sums the measurements. The performance framework does
not support nested measurement boundaries. If you use these methods incorrectly in a
Test method and run the test as a TimeExperiment, then the framework marks the
measurement as invalid. Also, you still can run these performance tests as unit tests. For
more information, see “Test Performance Using Classes” on page 33-189.33 Unit Testing