Commit e6c73581 authored by Anne Heimes's avatar Anne Heimes

Graphische ausgabe vom Log überarbeitet

parent d4d3a8b2
%% Einlesen der Logs
NetAudioLogNet = readtable( 'NetAudioLogNet.txt' );
NetAudioLogStream = readtable( 'NetAudioLogStream.txt' );
plot( NetAudioLogNet.WorldTimeStamp, NetAudioLogNet.FreeSamples/10240 )
hold on
plot( NetAudioLogStream.WorldTimeStamp, NetAudioLogStream.FreeSamples/10240 )
%% Plot Freie Smaples und Bufferstutus
minTime = min(NetAudioLogStream.WorldTimeStamp(1),NetAudioLogNet.WorldTimeStamp(1));
TimeNet = NetAudioLogNet.WorldTimeStamp - minTime;
TimeStream = NetAudioLogStream.WorldTimeStamp - minTime;
BlockLenght = NetAudioLogNet.NumSamplesTransmitted(1);
BufferSize = 100 * BlockLenght;
Data = [NetAudioLogNet.WorldTimeStamp NetAudioLogNet.FreeSamples; NetAudioLogStream.WorldTimeStamp NetAudioLogStream.FreeSamples];
Data = sortrows(Data,1 );
Data(:,1) = Data(:,1) - minTime();
Data(:,2) = (Data(:,2)) / BlockLenght;
subplot(2,2,1:2)
plot(Data(:,1), Data(:,2))
title('Freie Blcke im Ring Buffer')
xlabel('Zeit in s')
ylabel('Anzahl der Blcke')
%% Plot Latenz
subplot(2,2,3:4)
DiffTime = diff(NetAudioLogNet.WorldTimeStamp * 1000);
median = mean(DiffTime);
medianVec = zeros(size(DiffTime));
medianVec = medianVec + median;
plot( DiffTime, 'b')
hold on
%plot( NetAudioLogNet.WorldTimeStamp, NetAudioLogNet.Bufferstatus )
plot( NetAudioLogStream.WorldTimeStamp, NetAudioLogStream.StreamingStatus )
\ No newline at end of file
plot( medianVec, 'r')
title('Latenz pro Block')
legend('Latenz', 'Durchschnittliche Latenz')
xlabel('Block Nummer')
ylabel('Zeit in ms')
legend('show')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment