Main Content

matlab.perftest.TimeExperiment class

Package: matlab.perftest

Interface for measuring execution time of code under test


The matlab.perftest.TimeExperiment class is the principal interface for measuring the execution time of code under test. The performance testing framework runs a test suite and returns a matlab.unittest.measurement.MeasurementResult object for each element of the suite. For each test suite element, the testing framework collects multiple measurements and reports them in the corresponding MeasurementResult.


Instantiate a TimeExperiment object using one of its static methods.


limitingSamplingErrorConstruct time experiment for specified margin of error and confidence level
runRun time experiment on test suite
withFixedSampleSizeConstruct time experiment with fixed number of measurements

Copy Semantics

Handle. To learn how handle classes affect copy operations, see Copying Objects.

Version History

Introduced in R2016a