In your current working folder, create a class-based
test, preallocationTest.m
, that compares different
methods of preallocation.
Create a test suite.
Construct a time experiment with a variable number of
sample measurements, and run the tests.
Running preallocationTest
.......... .......... .......... ..
Done preallocationTest
__________
View the test activity for the first test. Your results
might vary.
ans =
8×12 table
Name Passed Failed Incomplete MeasuredTime Objective Timestamp Host Platform Version TestResult RunIdentifier
__________________________ ______ ______ __________ ____________ _________ ____________________ ___________ ________ _____________________ ________________________________ ____________________________________
preallocationTest/testOnes true false false 0.056052 warmup 05-Oct-2018 10:14:15 MY-HOSTNAME win64 9.6.0.966561 (R2019a) [1x1 matlab.unittest.TestResult] 34fa8e1d-e21f-42b5-83bd-fd104ffcec12
preallocationTest/testOnes true false false 0.056227 warmup 05-Oct-2018 10:14:15 MY-HOSTNAME win64 9.6.0.966561 (R2019a) [1x1 matlab.unittest.TestResult] 34fa8e1d-e21f-42b5-83bd-fd104ffcec12
preallocationTest/testOnes true false false 0.055969 warmup 05-Oct-2018 10:14:15 MY-HOSTNAME win64 9.6.0.966561 (R2019a) [1x1 matlab.unittest.TestResult] 34fa8e1d-e21f-42b5-83bd-fd104ffcec12
preallocationTest/testOnes true false false 0.054961 warmup 05-Oct-2018 10:14:15 MY-HOSTNAME win64 9.6.0.966561 (R2019a) [1x1 matlab.unittest.TestResult] 34fa8e1d-e21f-42b5-83bd-fd104ffcec12
preallocationTest/testOnes true false false 0.052572 sample 05-Oct-2018 10:14:15 MY-HOSTNAME win64 9.6.0.966561 (R2019a) [1x1 matlab.unittest.TestResult] 34fa8e1d-e21f-42b5-83bd-fd104ffcec12
preallocationTest/testOnes true false false 0.051743 sample 05-Oct-2018 10:14:15 MY-HOSTNAME win64 9.6.0.966561 (R2019a) [1x1 matlab.unittest.TestResult] 34fa8e1d-e21f-42b5-83bd-fd104ffcec12
preallocationTest/testOnes true false false 0.051709 sample 05-Oct-2018 10:14:15 MY-HOSTNAME win64 9.6.0.966561 (R2019a) [1x1 matlab.unittest.TestResult] 34fa8e1d-e21f-42b5-83bd-fd104ffcec12
preallocationTest/testOnes true false false 0.051256 sample 05-Oct-2018 10:14:15 MY-HOSTNAME win64 9.6.0.966561 (R2019a) [1x1 matlab.unittest.TestResult] 34fa8e1d-e21f-42b5-83bd-fd104ffcec12
For this test, the performance testing framework collected 4
warm-up measurements (the default), and 11 sample measurements. After
11 sample measurements, the performance testing framework satisfied
the default statistical objectives.
Construct a time experiment that collects two warm-up
measurements and runs the tests a variable number of times to reach
a sample mean with a 10% relative margin of error within a 90% confidence
level.
Running preallocationTest
.......... .......... ....
Done preallocationTest
__________
View the test activity for the first test. Your results
might vary.
ans =
6×12 table
Name Passed Failed Incomplete MeasuredTime Objective Timestamp Host Platform Version TestResult RunIdentifier
__________________________ ______ ______ __________ ____________ _________ ____________________ ___________ ________ _____________________ ________________________________ ____________________________________
preallocationTest/testOnes true false false 0.053963 warmup 05-Oct-2018 10:21:31 MY-HOSTNAME win64 9.6.0.966561 (R2019a) [1x1 matlab.unittest.TestResult] 22e4507c-e12c-4cac-8730-aff65e75a2e1
preallocationTest/testOnes true false false 0.053086 warmup 05-Oct-2018 10:21:31 MY-HOSTNAME win64 9.6.0.966561 (R2019a) [1x1 matlab.unittest.TestResult] 22e4507c-e12c-4cac-8730-aff65e75a2e1
preallocationTest/testOnes true false false 0.052502 sample 05-Oct-2018 10:21:31 MY-HOSTNAME win64 9.6.0.966561 (R2019a) [1x1 matlab.unittest.TestResult] 22e4507c-e12c-4cac-8730-aff65e75a2e1
preallocationTest/testOnes true false false 0.05252 sample 05-Oct-2018 10:21:31 MY-HOSTNAME win64 9.6.0.966561 (R2019a) [1x1 matlab.unittest.TestResult] 22e4507c-e12c-4cac-8730-aff65e75a2e1
preallocationTest/testOnes true false false 0.052048 sample 05-Oct-2018 10:21:32 MY-HOSTNAME win64 9.6.0.966561 (R2019a) [1x1 matlab.unittest.TestResult] 22e4507c-e12c-4cac-8730-aff65e75a2e1
preallocationTest/testOnes true false false 0.052434 sample 05-Oct-2018 10:21:32 MY-HOSTNAME win64 9.6.0.966561 (R2019a) [1x1 matlab.unittest.TestResult] 22e4507c-e12c-4cac-8730-aff65e75a2e1
For this test, the performance testing framework collected two
warm-up measurements and nine sample measurements. After nine sample
measurements, the performance testing framework satisfied the specified
statistical objectives.