Commit ba348dad authored by jayd1860's avatar jayd1860
Browse files

v1.18.3

-- Add host system info to debug logging, such as computer type, OS type, CPU type and speed, memory size, etc
-- Speed up very slow sizeof() function used in MemoryRequired methods
-- Add logging info about how fast data is loaded at startup
-- Add Logging entry to config to allow turning on/off of logging
-- Add chapters concept to logger to limit log file size
parent dbb39ff6
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -11,4 +11,7 @@ No
% Default Processing Stream Style
SNIRF

% Logging
On

% END
+18 −17
Original line number Diff line number Diff line
@@ -97,7 +97,6 @@ classdef DataTreeClass < handle
        
        
        
        
        % --------------------------------------------------------------
        function FindAndLoadGroups(obj, groupDirs, fmt, procStreamCfgFile)
            
@@ -148,6 +147,7 @@ classdef DataTreeClass < handle
            %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
            obj.ErrorCheckLoadedFiles();

            tic;            
            for ii=1:length(obj.groups)
                %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                % Load derived or post-acquisition data from a file if it
@@ -155,7 +155,6 @@ classdef DataTreeClass < handle
                %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                obj.groups(ii).Load();            
            
            
                %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                % Initialize procStream for all tree nodes
                %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -165,6 +164,9 @@ classdef DataTreeClass < handle
                % Generate the stimulus conditions for the group tree
                %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                obj.groups(ii).SetConditions();                
            end
            obj.logger.Write(sprintf('Loaded processing stream results in %0.1f seconds\n', toc));
            
            
            %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
            % Find the amount of memory the whole group tree requires
@@ -173,8 +175,7 @@ classdef DataTreeClass < handle
            % dc and dod for each new current element (currElem) on the
            % fly. This should be a menu option in future releases
            %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                % obj.logger.Write(sprintf('Memory required for acquisition data %0.1f MB\n', obj.groups(ii).MemoryRequired() / 1e6));
            end
            % obj.logger.Write(sprintf('Memory required for data tree: %0.1f MB\n', obj.groups(ii).MemoryRequired() / 1e6));
        end
        
        
@@ -187,6 +188,7 @@ classdef DataTreeClass < handle
            subjCurr = SubjClass().empty();
            runCurr = RunClass().empty();

            tic;            
            obj.logger.Write(sprintf('\n'));
            iG = 1;
            for iF=1:length(obj.files)
@@ -214,8 +216,7 @@ classdef DataTreeClass < handle
                    runCurr = RunClass().empty();
                end
            end
            
            obj.logger.Write(sprintf('\n'));            
            obj.logger.Write(sprintf('\nLoaded acquisition data in %0.1f seconds\n\n', toc));            
        end


+3 −0
Original line number Diff line number Diff line
@@ -641,6 +641,9 @@ classdef RunClass < TreeNodeClass
            if strcmp(option, 'disk')
                return 
            end
            if isempty(obj.acquired)
                return
            end
            nbytes = obj.acquired.MemoryRequired();
        end
    
+7 −0
Original line number Diff line number Diff line
@@ -24,6 +24,13 @@ elseif nargin==1 && isempty(inputFileFormat)
    inputFileFormat='snirf';
end
cfg = ConfigFileClass();

if strcmp(cfg.GetValue('Logging'), 'off')
    logger.SetDebugLevel(logger.Null());
end

PrintSystemInfo(logger);

logger.Write(sprintf('Opened application config file %s\n', cfg.filename))
gdir = cfg.GetValue('Last Group Folder');
if isempty(gdir)
+2 −0
Original line number Diff line number Diff line
@@ -171,6 +171,8 @@ s = get(hObject,'name');
title = sprintf('%s - %s', s, pwd);
set(hObject,'name', title);

maingui.logger.InitChapters()




Loading