% The parameter "scale" determines how long the benchmark runs; % typical values are: 1 for small size input % 10 for medium % 100 for large. % % The function "set_up_bmark" sets up the input data for the % benchmark, "bmark". This function must be defined for each % benchmark. The set_up_bmark accepts scale as the only parameter. % The value of the scale is used to manipulate the input size to % obtain the right size as described above. The function must also % return suitable values for the input parameters of the benchmark. % % The number of the output parameters of set_up_bmark must match the % number of the input parameters that the benchmark (bmark) expects. % The variables t_0, t_1 and t_2 record the time at different stages % of the benchmark. function [t_0, t_1, t_2] = drv_p_bmark(scale) t_0 = clock(); [arg0, arg1, ..., argn] = set_up_bmark(scale); % specialized for each % benchmark t_1 = clock(); result = bmark(arg0, arg1, ..., argn); % calls the benchmark t_2 = clock(); end