From 75ddfc941d7cc7fddc03a5074dbd56b486ab3656 Mon Sep 17 00:00:00 2001 From: Marcel Waldvogel Date: Wed, 2 Feb 2022 17:36:32 +0000 Subject: [PATCH 1/2] Dual PNG+SVG creation --- bin/copy-to-website.example | 2 +- bin/diff-freq-graph | 3 +- bin/graph-header | 15 +- bin/index | 6 +- bin/local-clock-graph | 13 +- bin/offset-graph | 11 +- bin/plot | 302 ++++++++++++++++++------------------ bin/run | 7 + bin/skew-graph | 3 +- 9 files changed, 189 insertions(+), 173 deletions(-) diff --git a/bin/copy-to-website.example b/bin/copy-to-website.example index 611a0f1..5575a01 100755 --- a/bin/copy-to-website.example +++ b/bin/copy-to-website.example @@ -1,3 +1,3 @@ #!/bin/bash -rsync --delete -avP *.png *.html ~/my.www.dir/html/graphs/ +rsync --delete -avP *.png *.svg *.html ~/my.www.dir/html/graphs/ diff --git a/bin/diff-freq-graph b/bin/diff-freq-graph index d5b7b27..bee8bae 100755 --- a/bin/diff-freq-graph +++ b/bin/diff-freq-graph @@ -1,4 +1,5 @@ #!/bin/bash +TERMINAL=$1 LINSCALELIMIT=1 for stat in statistics.*; do @@ -10,7 +11,7 @@ LINSCALELIMIT=`echo $LINSCALELIMIT | ../bin/mul 1000000` # echo $LINSCALELIMIT ( -../bin/graph-header all-diff-freq.png $LINSCALELIMIT "%1.1f us/s" "all clocks (diff freq)" "set yrange [-3:3]" +../bin/graph-header all-diff-freq $TERMINAL $LINSCALELIMIT "%1.1f us/s" "all clocks (diff freq)" "set yrange [-3:3]" ../bin/foreach-stat "'__FILE__' using 1:(\$6*1000000) title '__TITLE__' with line \\" echo ) | gnuplot diff --git a/bin/graph-header b/bin/graph-header index f40531b..42be0d0 100755 --- a/bin/graph-header +++ b/bin/graph-header @@ -1,10 +1,11 @@ #!/bin/bash -FILENAME=$1 -LINSCALELIMIT=$2 -FORMAT=$3 -TITLE=$4 -CUSTOM=$5 +BASENAME=$1 +TERMINAL=$2 +LINSCALELIMIT=$3 +FORMAT=$4 +TITLE=$5 +CUSTOM=$6 YTICS=`../bin/linlogytics $LINSCALELIMIT` @@ -12,10 +13,10 @@ YTICS=`../bin/linlogytics $LINSCALELIMIT` #echo $YTICS 1>&2 cat <"; $ALL_REMOTES .= "$img
\n"; - $ALL_REMOTES_WITH_LINK .= "$img
\n"; + $ALL_REMOTES_WITH_LINK .= "$img
\n"; } open(TMPL,"<","index.html.tmpl"); diff --git a/bin/local-clock-graph b/bin/local-clock-graph index 017cc24..b8fb88d 100755 --- a/bin/local-clock-graph +++ b/bin/local-clock-graph @@ -1,4 +1,5 @@ #!/bin/bash +TERMINAL=$1 LINSCALELIMIT=`../bin/linscalelimit 1 5 tracking.log | ../bin/mul 1000000` @@ -7,10 +8,10 @@ LINSCALELIMIT=`../bin/linscalelimit 1 5 tracking.log | ../bin/mul 1000000` YTICS=`../bin/linlogytics $LINSCALELIMIT` gnuplot </dev/null -NINETYFIVE=`../bin/percentile 3 95 tracking.log` -NINETYNINE=`../bin/percentile 3 99 tracking.log` -FIVE=`../bin/percentile 3 5 tracking.log` -ONE=`../bin/percentile 3 1 tracking.log` -NF_M_F=`echo $NINETYFIVE - $FIVE | bc` -NN_M_O=`echo $NINETYNINE - $ONE | bc` -gnuplot <tracking.log.history -../bin/histogram 5 1000000 tracking.log.history -SEVENTYFIVE=`../bin/percentile 5 75 tracking.log | ../bin/mul 1000000` -TWENTYFIVE=`../bin/percentile 5 25 tracking.log | ../bin/mul 1000000` + # for nanosecond level: + #../bin/histogram 5 1000000000 tracking.log.history + ../bin/histogram 5 1000000 tracking.log.history + SEVENTYFIVE=`../bin/percentile 5 75 tracking.log | ../bin/mul 1000000` + TWENTYFIVE=`../bin/percentile 5 25 tracking.log | ../bin/mul 1000000` -gnuplot <snr-history.history -#gnuplot <snr-history.hourly -#gnuplot <snr-history.history + #gnuplot <snr-history.hourly + #gnuplot < Date: Wed, 2 Feb 2022 21:32:21 +0100 Subject: [PATCH 2/2] Offsets did not generate SVGs --- bin/offset-graph | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/offset-graph b/bin/offset-graph index 94b155c..5e1d8e4 100755 --- a/bin/offset-graph +++ b/bin/offset-graph @@ -58,7 +58,7 @@ echo "$titles" | while read file title; do imagename=`echo $file | sed 's/:/_/g'` measurements_file=`echo $file | sed 's/^statistics/measurements/'` # Run only (1) for existing files and (2) once, so `titles.*` can be a sub-/superset - if [ -f "$file" -a ! -f "remote-${imagename}.png" -a ! -f "remote-${imagename}.svg" ]; then + if [ -f "$file" -a ! -f "remote-${imagename}.$TERMINAL" ]; then ( if [ -f $measurements_file ]; then FIFTY=`../bin/percentile 10 50 $measurements_file | ../bin/mul 1000000`