3 properties (Access=
private,Hidden)
4 % detailed profile info
12 self.StProfileInfo=[];
17 self.StProfileInfo=[];
22 function resTime=toc(self)
25 if isempty(self.StProfileInfo)
27 self.StProfileInfo=profile('info');
31 function StProfileInfo=getProfileInfo(self)
33 if isempty(self.StProfileInfo)
35 'You must call TOC before calling getProfileInfo');
37 StProfileInfo=self.StProfileInfo;
39 function resTime=process(self,varargin)
45 [reg,callerName,profileDir,profileMode,isCallerNameSpec,...
48 {
'callerName',
'profileDir',
'profileMode';...
50 'isstring(x)',
'isstring(x)||ischar(x)&&isempty(x)',...
51 'isstring(x)'},[1 2],...
55 'regDefList',{[],
'default'});
61 profileDir=fileparts(which(callerName));
67 profCaseName=
'default';
69 %% process profiling results
72 SProfileInfo=
self.getProfileInfo();
73 switch lower(profileMode)
75 profCaseName=[callerName,
'.',profCaseName];
77 SProfileInfo,
'titlePrefix',profCaseName);
81 profName=[callerName,...
83 filesep,datestr(now(),
'dd-mmm-yyyy_HH_MM_SS_FFF')];
86 SProfileInfo,profDir);
89 'profMode %s is not supported',profileMode);
function throwerror(in msgTag, in varargin)
THROWERROR works similarly to built-in ERROR function in case when there is no output arguments but s...
function parseparext(in args, in propNameValMat, in varargin)
PARSEPAREXT behaves in the same way as mxberry.core.parseparams but returns property values in a more...
function checkvar(in x, in typeSpec, in varargin)
CHECKVAR checks a generic condition provided by typeSpec string in the following format: 'isnumeric(x...
PROFILEINFO contains profiling info obtaining during exectution of some code.
function profView(in varargin)
PROFVIEW enhances a functionality of Matlab built-in function profview by allowing to display several...
function profSave(in SProfileInfo, in dirName)
PROFSAVE does the same as the built-in profsave function except for displaying the saved report in th...
PROFILEINFODETAILED contains detailed profiling info obtaining during exectution of some code...