Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to SVG #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/copy-to-website.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh

rsync --delete -avP *.png *.html ~/my.www.dir/html/graphs/
rsync --delete -avP *.svg *.html ~/my.www.dir/html/graphs/
2 changes: 1 addition & 1 deletion bin/diff-freq-graph
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

(
../bin/graph-header all-diff-freq.png "%1.1f us/s" "all clocks (diff freq)" "set yrange [-3:3]"
../bin/graph-header all-diff-freq.svg "%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
2 changes: 1 addition & 1 deletion bin/graph-header
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ TITLE=$3
CUSTOM=$4

cat <<EOF
set terminal png size 900,600
set terminal svg size 900,600
set xdata time
set timefmt "%s"
set output "$FILENAME"
Expand Down
12 changes: 6 additions & 6 deletions bin/local-clock-graph
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/bin/sh

gnuplot <<EOF
set terminal png size 900,600
set terminal svg size 900,600
set xdata time
set timefmt "%s"
set output "local-clock.png"
set output "local-clock.svg"
set grid
set xlabel "Time"
set format x "%d-%H:%M"
Expand All @@ -27,10 +27,10 @@ ONE=`../bin/percentile 8 1 tracking.log | ../bin/mul 1000000`
NF_M_F=`echo $NINETYFIVE - $FIVE | bc`
NN_M_O=`echo $NINETYNINE - $ONE | bc`
gnuplot <<EOF
set terminal png size 900,600
set terminal svg size 900,600
set xdata time
set timefmt "%s"
set output "local-clock-stddev.png"
set output "local-clock-stddev.svg"
set grid
set xlabel "Time"
set format x "%d-%H:%M"
Expand Down Expand Up @@ -61,10 +61,10 @@ ONE=`../bin/percentile 4 1 tracking.log`
NF_M_F=`echo $NINETYFIVE - $FIVE | bc`
NN_M_O=`echo $NINETYNINE - $ONE | bc`
gnuplot <<EOF
set terminal png size 900,600
set terminal svg size 900,600
set xdata time
set timefmt "%s"
set output "local-clock-skew.png"
set output "local-clock-skew.svg"
set grid
set xlabel "Time"
set format x "%d-%H:%M"
Expand Down
10 changes: 5 additions & 5 deletions bin/offset-graph
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

(
../bin/graph-header all-offset.png "%1.0f us" "all clocks (offset)" ""
../bin/graph-header all-offset.svg "%1.0f us" "all clocks (offset)" ""
../bin/foreach-stat "'__FILE__' using 1:(\$4*1000000) title '__TITLE__' with line \\"
echo
) | gnuplot
Expand All @@ -17,7 +17,7 @@ else
fi

#(
# ../bin/graph-header remote-strat1.png "%1.0f us" "offset of remote strat1s" ""
# ../bin/graph-header remote-strat1.svg "%1.0f us" "offset of remote strat1s" ""
# i=0
# echo "$titles" | while read file title; do
# if [ $i != 0 ]; then
Expand All @@ -30,7 +30,7 @@ fi
#) | gnuplot
#
#(
# ../bin/graph-header remote-strat1-downstream.png "%1.0f us" "offset-rtt/2 of remote strat1s" ""
# ../bin/graph-header remote-strat1-downstream.svg "%1.0f us" "offset-rtt/2 of remote strat1s" ""
# i=0
# echo "$titles" | while read file title; do
# measurements_file=`echo $file | sed 's/^statistics/measurements/'`
Expand All @@ -53,15 +53,15 @@ echo "$titles" | while read file title; do
if [ -f $measurements_file ]; then
FIFTY=`../bin/percentile 10 50 $measurements_file | ../bin/mul 1000000`
CUSTOM="set label 1 gprintf('50%% = $FIFTY us',50) at graph 0.01,0.05 left front"
../bin/graph-header remote-${imagename}.png "%1.0f us" "offset of $title" "$CUSTOM"
../bin/graph-header remote-${imagename}.svg "%1.0f us" "offset of $title" "$CUSTOM"
echo "'$measurements_file' using 1:(\$11*1000000) title 'offset' with line, \\"
echo "'$measurements_file' using 1:((\$11+\$12/2)*1000000) title 'offset+rtt/2' with line, \\"
echo "'$measurements_file' using 1:((\$11-\$12/2)*1000000) title 'offset-rtt/2' with line, \\"
echo "$FIFTY title '50th percentile'"
else
FIFTY=`../bin/percentile 3 50 $file | ../bin/mul 1000000`
CUSTOM="set label 1 gprintf('50%% = $FIFTY us',50) at graph 0.01,0.05 left front"
../bin/graph-header remote-${imagename}.png "%1.0f us" "offset of $title" "$CUSTOM"
../bin/graph-header remote-${imagename}.svg "%1.0f us" "offset of $title" "$CUSTOM"
echo "'$file' using 1:(\$4*1000000) title 'offset' with line, \\"
echo "$FIFTY title '50th percentile'"
fi
Expand Down
24 changes: 12 additions & 12 deletions bin/plot
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ ONE=`../bin/percentile 3 1 tracking.log`
NF_M_F=`echo $NINETYFIVE - $FIVE | bc`
NN_M_O=`echo $NINETYNINE - $ONE | bc`
gnuplot <<EOF
set terminal png size 900,600
set terminal svg size 900,600
set xdata time
set timefmt "%s"
set output "percentiles.png"
set output "percentiles.svg"
set grid
set xlabel "Time"
set format x "%d-%H:%M"
Expand Down Expand Up @@ -49,10 +49,10 @@ ONE=`../bin/percentile 5 1 tracking.log | ../bin/mul 1000000`
NF_M_F=`echo $NINETYFIVE - $FIVE | bc`
NN_M_O=`echo $NINETYNINE - $ONE | bc`
gnuplot <<EOF
set terminal png size 900,600
set terminal svg size 900,600
set xdata time
set timefmt "%s"
set output "percentiles-offset.png"
set output "percentiles-offset.svg"
set grid
set xlabel "Time"
set format x "%d-%H:%M"
Expand Down Expand Up @@ -83,8 +83,8 @@ SEVENTYFIVE=`../bin/percentile 5 75 tracking.log | ../bin/mul 1000000`
TWENTYFIVE=`../bin/percentile 5 25 tracking.log | ../bin/mul 1000000`

gnuplot <<EOF
set terminal png size 900,600
set output "offset-histogram.png"
set terminal svg size 900,600
set output "offset-histogram.svg"
set grid
set xtic rotate by -45 scale 0
set title "Local Clock Offsets - Histogram"
Expand All @@ -111,10 +111,10 @@ EOF

# optional GPS tracking
#gnuplot <<EOF
#set terminal png size 900,600
#set terminal svg size 900,600
#set xdata time
#set timefmt "%s"
#set output "gps-lock.png"
#set output "gps-lock.svg"
#set grid
#set xlabel "Time"
#set format x "%d-%H:%M"
Expand All @@ -128,8 +128,8 @@ EOF
#
#../bin/histogram-snr <snr-history >snr-history.history
#gnuplot <<EOF
#set terminal png size 900,600
#set output "gps-snr-histogram.png"
#set terminal svg size 900,600
#set output "gps-snr-histogram.svg"
#set grid
#set xtic rotate by -45 scale 0
#set title "GPS SNR histogram"
Expand All @@ -141,10 +141,10 @@ EOF
#
#../bin/snr-hourly snr-history >snr-history.hourly
#gnuplot <<EOF
#set terminal png size 900,600
#set terminal svg size 900,600
#set xdata time
#set timefmt "%s"
#set output "gps-snr-hourly.png"
#set output "gps-snr-hourly.svg"
#set grid
#set xlabel "Time"
#set format x "%d-%H:%M"
Expand Down
2 changes: 1 addition & 1 deletion bin/skew-graph
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

(
../bin/graph-header all-skew.png "%1.0f us/s" "all clocks (skew)" "set yrange [-10:10]"
../bin/graph-header all-skew.svg "%1.0f us/s" "all clocks (skew)" "set yrange [-10:10]"
../bin/foreach-stat "'__FILE__' using 1:(\$6*1000000) title '__TITLE__' with line \\"
echo
) | gnuplot
20 changes: 10 additions & 10 deletions runX/index.html.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
<p>
Last update - __TIME__ GMT
</p>
<img src="local-clock.png" alt="Local Clock: Frequency + Offset"><br>
<img src="percentiles.png" alt="Local Clock: Frequency detail"><br>
<img src="percentiles-offset.png" alt="Local Clock: Offset detail"><br>
<img src="offset-histogram.png" alt="Local Clock: Offset histogram"><br>
<img src="local-clock-skew.png" alt="Local Clock: Skew"><br>
<img src="local-clock-stddev.png" alt="Local Clock: stddev"><br>
<img src="all-diff-freq.png" alt="Remote Clocks: Frequency Difference"><br>
<img src="all-offset.png" alt="Remote Clocks: Offsets"><br>
<img src="all-skew.png" alt="Remote Clocks: Skew"><br>
<img src="remote-statistics.SET_IP_HERE.png" alt="Remote Clock: SERVER_NAME"><br>
<img src="local-clock.svg" alt="Local Clock: Frequency + Offset"><br>
<img src="percentiles.svg" alt="Local Clock: Frequency detail"><br>
<img src="percentiles-offset.svg" alt="Local Clock: Offset detail"><br>
<img src="offset-histogram.svg" alt="Local Clock: Offset histogram"><br>
<img src="local-clock-skew.svg" alt="Local Clock: Skew"><br>
<img src="local-clock-stddev.svg" alt="Local Clock: stddev"><br>
<img src="all-diff-freq.svg" alt="Remote Clocks: Frequency Difference"><br>
<img src="all-offset.svg" alt="Remote Clocks: Offsets"><br>
<img src="all-skew.svg" alt="Remote Clocks: Skew"><br>
<img src="remote-statistics.SET_IP_HERE.svg" alt="Remote Clock: SERVER_NAME"><br>
<pre>
__RUN__ notes:
__NOTES__
Expand Down