Simple code for visualizing behaviour.
%
% NOTE: Must mount /data/solo/ first. SolO DB fails without error if directories
% are not available.
%
% NOTE: May have to account for caching of (mounted/non-mounted) CDF files. SolO
% DB also has its own caching(?).
%
function read_TNR___speedTest
tic
close all
solo.db_init('local_file_db', '/data/solo/');
solo.db_init('db_cache_size_max', 4096) % Unit: MiB.
solo.db_cache('on', 'save')
% N_SEC_ARRAY = 86400 * logspace(log10(0.1), log10(1), 5);
N_SEC_ARRAY = 86400 * [0.2, 0.5, 1, 2, 3];
for i = 1:numel(N_SEC_ARRAY)
nSec = N_SEC_ARRAY(i);
tWallTimeSec = measure_read_TNR_walltime(nSec);
fprintf('i = %i\n', i)
fprintf('nSec = %g\n', nSec)
fprintf('tWallTimeSec = %g\n', tWallTimeSec)
nSecArray(i) = nSec;
tWallTimeSecArray(i) = tWallTimeSec;
end
plot(nSecArray/86400, tWallTimeSecArray, 'o-')
xlabel('Length of time interval with TNR data [days]')
ylabel('Wall time [s]')
grid on
toc
end
function tWallTimeSec = measure_read_TNR_walltime(nSec)
START_TIME = irf.time_array('2022-12-28T00:00:00.00Z');
STOP_TIME = START_TIME + nSec;
READ_TNR_TINT = [START_TIME; STOP_TIME];
t = tic();
TnrData = solo.read_TNR(READ_TNR_TINT);
tWallTimeSec = toc(t);
end
Step 1: Latest code?
git pullthis is still a problem).Should be present in latest commit on devel branch:
b679b71a Erik P G Johansson (2024-04-08 12:46:41 +0200)Step 2: Describe your environment
master,devel): develMatlab R2020b): MATLAB R2023bWindows 10,Mac OS X 10.15.6,Linux Ubuntu 20.04): Ubuntu 22.04.4 LTSStep 3: Describe the problem
solo.read_TNR()appears to have performance issues. Wall time spent in function increases faster than linearly with length of time interval of data used for it (the argument).Steps to reproduce:
Simple code for visualizing behaviour.