I need to analyze a big source code.Code contains several function calls. Depending upon the computation and communication between function calls, i will need to figure out the best configuration scheme for the overall execution of the source code.
According to me ,
Data communicated in calling a function(if it is on different machine,server etc)=Input Data Size+Output Data Size
for getting the input data size and output data size ,i think i should rewrite all functions to have variable number of inputs and variables outputs.
[varargout] samplefunction(varargin) {
FOR i=0:nargin
inputdata=inputdata+sizeof(varargin(i));
% Do stuff here
}
isn't there a way to calculate size of cell array(varargin/varargout) directly in Matlab ?
or if u can suggest another approach to measure communicated data between function call ?
A call to
cellfun()
with string inputs would be very fast:or
or