Add a advanced example

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.
This commit is contained in:
Christian_x7
2020-10-24 10:14:58 +02:00
parent 9eedf15e9e
commit 76a6216cf7
35 changed files with 7125 additions and 0 deletions
@@ -0,0 +1,41 @@
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