function helperPlotExecutionProfile(executionProfile)
%helperPlotExecutionProfile Plots the simulation time taken by the step
%function that is generated from LaneMarkerDetector.slx.
%
% This is a helper script for example purposes and may be removed or
% modified in the future.

% Copyright 2020 The MathWorks, Inc.
%%  Extract Simulation time and sample time taken for step function
    step0_executionTime = executionProfile.Sections(2).ExecutionTimeInSeconds;
    step0_sampleTime = executionProfile.Sections(2).Time;  
    endTime = step0_sampleTime(end);
    figure('Name','Execution profiles');
    h = subplot(1,1,1);
    line(h,step0_sampleTime,step0_executionTime,'Color','Red');
    grid on;
    title('SIL Task Execution Time')
    xlabel('Simulation Time (sec)');
    ylabel('Time (sec)');
    xlim([0 endTime]);
    ylim([0 0.1]);
end