FastVarOpts>FastVarOpts.getVarOpts (Calls: 10, Time: 0.050 s)
Generated 04-Jun-2021 04:11:18 using performance time.
class method in file C:\Program Files\MATLAB\R2020b\toolbox\shared\io\general\+matlab\+io\+internal\FastVarOpts.m
Copy to new window for comparing multiple runs
Function Name | Function Type | Calls |
...>ImportOptions.get.VariableOptions | class method | 10 |
Line Number | Code | Calls | Total Time | % Time | Time Plot |
162 | opts(kk) = getTypedOpts(type,a... | 30 | 0.028 s | 54.9% | |
165 | theNames = obj.Names(idx); | 10 | 0.012 s | 23.2% | |
166 | [opts(1:numel(idx)).Name] = th... | 10 | 0.005 s | 9.6% | |
145 | opts = matlab.io.TextVariableI... | 10 | 0.004 s | 8.4% | |
161 | args = C{idx(kk)}; | 30 | 0.000 s | 0.8% | |
All other lines | 0.002 s | 3.0% | |||
Totals | 0.050 s | 100% |
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
FastVarOpts>getTypedOpts | class method | 30 | 0.026 s | 51.9% | |
FastVarOpts>FastVarOpts.get.Names | class method | 10 | 0.011 s | 22.1% | |
...portOptions.TextVariableImportOptions | class method | 10 | 0.003 s | 6.6% | |
VarOptsInputs>VarOptsInputs.set.Name | class method | 30 | 0.002 s | 3.0% | |
Self time (built-ins, overhead, etc.) | 0.008 s | 16.4% | |||
Totals | 0.050 s | 100% |
Total lines in function | 24 |
Non-code lines (comments, blank lines) | 3 |
Code lines (lines that can run) | 21 |
Code lines that did run | 17 |
Code lines that did not run | 4 |
Coverage (did run/can run) | 80.95 % |
time | Calls | line | |
---|---|---|---|
144 | function opts = getVarOpts(obj,idx) | ||
0.004 | 10 | 145 | opts = matlab.io.TextVariableImportOptions().empty(); |
< 0.001 | 10 | 146 | C = obj.OptionsStruct.Options; |
< 0.001 | 10 | 147 | if nargin < 2 |
< 0.001 | 10 | 148 | idx = 1:numel(C); |
149 | else | ||
150 | idx = obj.fixSelection(idx); | ||
< 0.001 | 10 | 151 | end |
152 | |||
< 0.001 | 10 | 153 | if ~obj.NeedsUniformCheck && numel(C) > 0 |
154 | % just get one and Repmat | ||
155 | type = obj.OptionsStruct.Types{idx(1)}; | ||
156 | opts = repmat(getTypedOpts(type,C{idx(1)}),1,numel(idx)); | ||
< 0.001 | 10 | 157 | else |
< 0.001 | 10 | 158 | types = obj.OptionsStruct.Types; |
< 0.001 | 10 | 159 | for kk = 1:numel(idx) |
< 0.001 | 30 | 160 | type = types{idx(kk)}; |
< 0.001 | 30 | 161 | args = C{idx(kk)}; |
0.028 | 30 | 162 | opts(kk) = getTypedOpts(type,args); |
< 0.001 | 30 | 163 | end |
< 0.001 | 10 | 164 | end |
0.012 | 10 | 165 | theNames = obj.Names(idx); |
0.005 | 10 | 166 | [opts(1:numel(idx)).Name] = theNames{:}; |
< 0.001 | 10 | 167 | end |
Other subfunctions in this file are not included in this listing.