keepMeasuring
Class: matlab.perftest.TestCase
Namespace: matlab.perftest
Measure code with automatic looping
Description
keepMeasuring(
instructs the testing
framework to iterate through a testcase
)while
loop as many times as it needs to
get an accurate measurement of performance.
Performance tests that execute too quickly for MATLAB® to time accurately are filtered with an assumption failure. With the
keepMeasuring
method, the testing framework can measure significantly
faster code by automatically determining the number of times to iterate through code and
measuring the average performance.
You cannot put a keepMeasuring-while
loop between calls to
startMeasuring
and stopMeasuring
. Similarly, you cannot
call the startMeasuring
and stopMeasuring
methods inside a
keepMeasuring-while
loop.
keepMeasuring(
labels the measurement with testcase
,label
)label
. Measurements generated in the same
test method and with the same label are accumulated and summed. The label is appended in
angle brackets to the test element name in the Samples
and
TestActivity
properties of the MeasurementResult
object.
Input Arguments
Examples
Version History
Introduced in R2018b