mirror of
https://github.com/vdemydiuk/mtapi.git
synced 2026-07-28 11:07:48 +00:00
76a6216cf7
It uses its own API which I packed between MTApi5 and MatLab. Possible that this is useless, but errors from the .NET assembly are more tradable.
42 lines
771 B
Matlab
42 lines
771 B
Matlab
function testspeed(logPath)
|
|
|
|
opts.path = logPath;
|
|
L = logging.getLogger('testlogger', opts);
|
|
|
|
L.setCommandWindowLevel(L.TRACE);
|
|
L.setLogLevel(L.OFF);
|
|
tic;
|
|
for i=1:1e3
|
|
L.trace('test');
|
|
end
|
|
disp('1e3 logs when logging only to command window');
|
|
toc;
|
|
|
|
L.setCommandWindowLevel(L.OFF);
|
|
L.setLogLevel(L.OFF);
|
|
tic;
|
|
for i=1:1e3
|
|
L.trace('test');
|
|
end
|
|
disp('1e3 logs when logging is off');
|
|
toc;
|
|
|
|
L.setCommandWindowLevel(L.OFF);
|
|
L.setLogLevel(L.TRACE);
|
|
tic;
|
|
for i=1:1e3
|
|
L.trace('test');
|
|
end
|
|
disp('1e3 logs when logging to file');
|
|
toc;
|
|
L.setCommandWindowLevel(L.OFF);
|
|
L.setLogLevel(L.TRACE);
|
|
|
|
tic;
|
|
for i=1:1e3
|
|
L.trace(@() 'test');
|
|
end
|
|
disp('1e3 logs when logging to file using function handle');
|
|
toc;
|
|
end
|