mirror of
https://github.com/vdemydiuk/mtapi.git
synced 2026-07-29 03:27:48 +00:00
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:
@@ -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
|
||||
Reference in New Issue
Block a user