From 1c9fb707fea50d31dd940382b6a3af1a7e4901a3 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Thu, 3 Jan 2019 18:16:02 +0100 Subject: tests: overengineer extractloop_plot_csv.m a little Plot iteration time on second y axis, adjust line styles --- tests/stress_tests/extractloop.bash | 2 +- tests/stress_tests/extractloop_plot_csv.m | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/stress_tests/extractloop.bash b/tests/stress_tests/extractloop.bash index 055103b..742715d 100755 --- a/tests/stress_tests/extractloop.bash +++ b/tests/stress_tests/extractloop.bash @@ -93,7 +93,7 @@ function loop { delta=$((t2-t1)) if [[ $FSPID -gt 0 && -d /proc ]]; then RSS=$(grep VmRSS /proc/$FSPID/status | tr -s ' ' | cut -f2 -d ' ') - echo "$N,$SECONDS,$RSS" >> $CSV + echo "$N,$SECONDS,$RSS,$delta" >> $CSV fi echo "[looper $ID] Iteration $N done, $delta seconds, RSS $RSS kiB" let N=$N+1 diff --git a/tests/stress_tests/extractloop_plot_csv.m b/tests/stress_tests/extractloop_plot_csv.m index d6c164e..be80656 100755 --- a/tests/stress_tests/extractloop_plot_csv.m +++ b/tests/stress_tests/extractloop_plot_csv.m @@ -2,9 +2,13 @@ r=csvread('/tmp/extractloop.csv'); figure('Position',[100,100,1600,800]); -plot(r(:,2), r(:,3)/1024, '-o'); -xlabel('seconds') -ylabel('RSS MiB') +[hAx,hLine1,hLine2] = plotyy(r(:,2), r(:,3)/1024, r(:,2), r(:,4)); +xlabel('Runtime (seconds)') +set(hLine1, 'LineWidth', 1, 'Marker', 'o', 'MarkerSize', 10) +% LineWidth also sets the marker drawing thickness +set(hLine2, 'LineWidth', 1, 'LineStyle', 'none', 'Marker', '*', 'MarkerSize', 10) +ylabel(hAx(1), 'RSS (MiB)') +ylabel(hAx(2), 'Iteration Time (seconds)') grid on; drawnow; disp('press enter to exit'); -- cgit v1.2.3