testCase.verifyEqual(nbytes,length(textToWrite))
end
end
end
The measured time for this performance test includes only the call to fprintf, and the
testing framework still evaluates the qualifications.
Run Performance Test
Run the performance test. Depending on your system, you might see warnings that the
performance testing framework ran the test the maximum number of times, but did not
achieve a 0.05 relative margin of error with a 0.95 confidence level.
results = runperf('fprintfTest')
Running fprintfTest
.......... ......
Done fprintfTest
results =
1×2 TimeResult array with properties:
Name
Valid
Samples
TestActivity
Totals:
2 Valid, 0 Invalid.
The results variable is a 1x2 MeasurementResult array. Each element in the array
corresponds to one of the tests defined in the test file.
Display Test Results
Display the measurement results for the first test. Your results might vary.
results(1)
ans =
TimeResult with properties:
Name: 'fprintfTest/testPrintingToFile'
Test Performance Using Classes