Replot with labels

Replot with labels

# Note you need gnuplot 4.4 for the pdfcairo terminal.

# set terminal pdfcairo font "Gill Sans,9" linewidth 4 rounded fontscale 1.0
set terminal pdfcairo font "Gill Sans,7" linewidth 1 rounded fontscale 1.0

# Line style for axes
set style line 80 lt rgb "#808080"

# Line style for grid
set style line 81 lt 0  # dashed
set style line 81 lt rgb "#808080"  # grey

set grid back linestyle 81
set border 3 back linestyle 80 # Remove border on top and right.  These
             # borders are useless and make it harder
             # to see plotted lines near the border.
    # Also, put it in grey; no need for so much emphasis on a border.
# set xtics nomirror
# set ytics nomirror

#set log y
#set mxtics 10    # Makes logscale look good.

# Line styles: try to pick pleasing colors, rather
# than strictly primary colors or hard-to-see colors

# like gnuplot's default yellow.  Make the lines thick
# so they're easy to see in small plots in papers.
set style line 1 lc rgb "#A00000" pt 7
set style line 2 lc rgb "#00A000" pt 7
set style line 3 lc rgb "#5060D0" pt 7
set style line 4 lc rgb "#F25900" pt 7
# Let gnuplot decide the color, if more than 4 lines
set style line 5 pt 7
set style line 6 pt 7
set style line 7 pt 7
set style line 8 pt 7

set output outputname
set xlabel "ops/sec"
set ylabel "latency (sec)"

set key left top

set datafile missing '0'

# log scale on the y axis
# set logscale y 2
# set format y ""
# set ytics 1e-6, 10, 1
# set ytics add ("1" 1, ".1" 0.1, ".01" 0.01, "10^-3" 0.001, \
#                "10^-4" 0.0001)
# set mytics 10

set yrange [0:*]

# set xrange [0:60]
# set yrange [0.5:64]

# Titles with spaces are not allowed
# These titles should be separated by "_" and here we replace by " "
pretty(title) = system("echo ".title." | sed 's/_/ /g'")

# Input file contains comma-separated values fields
set datafile separator ","

plot for [i=0:words(inputnames) - 1] word(inputnames, i + 1) using 1:2:3 with linespoint ls i + 1 title pretty(word(titles, i + 1))
replot for [i=0:words(inputnames) - 1] word(inputnames, i + 1) using 1:2:3 with labels offset char 1,0 notitle

# Note you need gnuplot 4.4 for the pdfcairo terminal.

# set terminal pdfcairo font "Gill Sans,9" linewidth 4 rounded fontscale 1.0
set terminal pdfcairo font "Gill Sans,7" linewidth 1 rounded fontscale 1.0

# Line style for axes
set style line 80 lt rgb "#808080"

# Line style for grid
set style line 81 lt 0  # dashed
set style line 81 lt rgb "#808080"  # grey

set grid back linestyle 81
set border 3 back linestyle 80 # Remove border on top and right.  These
             # borders are useless and make it harder
             # to see plotted lines near the border.
    # Also, put it in grey; no need for so much emphasis on a border.
# set xtics nomirror
# set ytics nomirror

#set log y
#set mxtics 10    # Makes logscale look good.

# Line styles: try to pick pleasing colors, rather
# than strictly primary colors or hard-to-see colors

# like gnuplot's default yellow.  Make the lines thick
# so they're easy to see in small plots in papers.
set style line 1 lc rgb "#A00000" pt 7
set style line 2 lc rgb "#00A000" pt 7
set style line 3 lc rgb "#5060D0" pt 7
set style line 4 lc rgb "#F25900" pt 7
# Let gnuplot decide the color, if more than 4 lines
set style line 5 pt 7
set style line 6 pt 7
set style line 7 pt 7
set style line 8 pt 7

set output outputname
set xlabel "ops/sec"
set ylabel "latency (sec)"

set key left top

set datafile missing '0'

# log scale on the y axis
# set logscale y 2
# set format y ""
# set ytics 1e-6, 10, 1
# set ytics add ("1" 1, ".1" 0.1, ".01" 0.01, "10^-3" 0.001, \
#                "10^-4" 0.0001)
# set mytics 10

set yrange [0:*]

# set xrange [0:60]
# set yrange [0.5:64]

# Titles with spaces are not allowed
# These titles should be separated by "_" and here we replace by " "
pretty(title) = system("echo ".title." | sed 's/_/ /g'")

# Input file contains comma-separated values fields
set datafile separator ","

plot for [i=0:words(inputnames) - 1] word(inputnames, i + 1) using 1:2:3 with linespoint ls i + 1 title pretty(word(titles, i + 1)), '' with labels offset char 1,0


More benchmarking

More benchmarking

set terminal svg 1000,500
# set terminal pdfcairo color size 12cm,5cm font "Arial,6pt"
set datafile separator ","
set datafile commentschars "//"
set xtics norotate
set style fill solid
set yrange[0:]
set key off
set boxwidth 0.8
set style histogram clustered gap 3 title
set style data histograms
set bmargin 3

set key right outside
set ylabel "Avg. performance [cycles/byte]"
set yrange [0:16]

set title "EverCrypt Hash Performance (message size 65536 bytes)"
set output 'bench_meta_hash_evercrypt.pdf'
plot \
  '< grep -e "^\"EverCrypt" -e "^\"Provider" evercrypt-openssl-default-gcc-7/bench_hash_all_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-default-gcc-7", \
  '< grep -e "^\"EverCrypt" -e "^\"Provider" evercrypt-openssl-no-asm-gcc-7/bench_hash_all_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-no-asm-gcc-7", \
  '< grep -e "^\"EverCrypt" -e "^\"Provider" evercrypt-openssl-default-gcc-8/bench_hash_all_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-default-gcc-8", \
  '< grep -e "^\"EverCrypt" -e "^\"Provider" evercrypt-openssl-no-asm-gcc-8/bench_hash_all_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-no-asm-gcc-8", \
  '< grep -e "^\"EverCrypt" -e "^\"Provider" evercrypt-openssl-default-clang-7/bench_hash_all_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-default-clang-7", \
  '< grep -e "^\"EverCrypt" -e "^\"Provider" evercrypt-openssl-no-asm-clang-7/bench_hash_all_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-no-asm-clang-7", \
  '< grep -e "^\"EverCrypt" -e "^\"Provider" evercrypt-openssl-default-clang-8/bench_hash_all_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-default-clang-8", \
  '< grep -e "^\"EverCrypt" -e "^\"Provider" evercrypt-openssl-no-asm-clang-8/bench_hash_all_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-no-asm-clang-8"

set title "OpenSSL Hash Performance (message size 65536 bytes)"
set output 'bench_meta_hash_openssl.pdf'
plot \
  '< grep -e "^\"OpenSSL" -e "^\"Provider" evercrypt-openssl-default-gcc-7/bench_hash_all_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-default-gcc-7", \
  '< grep -e "^\"OpenSSL" -e "^\"Provider" evercrypt-openssl-no-asm-gcc-7/bench_hash_all_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-no-asm-gcc-7", \
  '< grep -e "^\"OpenSSL" -e "^\"Provider" evercrypt-openssl-default-gcc-8/bench_hash_all_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-default-gcc-8", \
  '< grep -e "^\"OpenSSL" -e "^\"Provider" evercrypt-openssl-no-asm-gcc-8/bench_hash_all_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-no-asm-gcc-8", \
  '< grep -e "^\"OpenSSL" -e "^\"Provider" evercrypt-openssl-default-clang-7/bench_hash_all_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-default-clang-7", \
  '< grep -e "^\"OpenSSL" -e "^\"Provider" evercrypt-openssl-no-asm-clang-7/bench_hash_all_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-no-asm-clang-7", \
  '< grep -e "^\"OpenSSL" -e "^\"Provider" evercrypt-openssl-default-clang-8/bench_hash_all_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-default-clang-8", \
  '< grep -e "^\"OpenSSL" -e "^\"Provider" evercrypt-openssl-no-asm-clang-8/bench_hash_all_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-no-asm-clang-8"

set key right outside
set ylabel "Avg. performance [cycles/byte]"
set yrange [0:30]
set xrange[-0.5:2.5]

set title "EverCrypt AEAD Performance (message size 65536 bytes)"
set output 'bench_meta_aead_evercrypt.pdf'
plot \
  '< grep -e "^\"EverCrypt" -e "^\"Provider" evercrypt-openssl-default-gcc-7/bench_aead_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-default-gcc-7", \
  '< grep -e "^\"EverCrypt" -e "^\"Provider" evercrypt-openssl-no-asm-gcc-7/bench_aead_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-no-asm-gcc-7", \
  '< grep -e "^\"EverCrypt" -e "^\"Provider" evercrypt-openssl-default-gcc-8/bench_aead_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-default-gcc-8", \
  '< grep -e "^\"EverCrypt" -e "^\"Provider" evercrypt-openssl-no-asm-gcc-8/bench_aead_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-no-asm-gcc-8", \
  '< grep -e "^\"EverCrypt" -e "^\"Provider" evercrypt-openssl-default-clang-7/bench_aead_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-default-clang-7", \
  '< grep -e "^\"EverCrypt" -e "^\"Provider" evercrypt-openssl-no-asm-clang-7/bench_aead_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-no-asm-clang-7", \
  '< grep -e "^\"EverCrypt" -e "^\"Provider" evercrypt-openssl-default-clang-8/bench_aead_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-default-clang-8", \
  '< grep -e "^\"EverCrypt" -e "^\"Provider" evercrypt-openssl-no-asm-clang-8/bench_aead_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-no-asm-clang-8"

set title "OpenSSL AEAD Performance (message size 65536 bytes)"
set output 'bench_meta_aead_openssl.pdf'
plot \
  '< grep -e "^\"OpenSSL" -e "^\"Provider" evercrypt-openssl-default-gcc-7/bench_aead_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-default-gcc-7", \
  '< grep -e "^\"OpenSSL" -e "^\"Provider" evercrypt-openssl-no-asm-gcc-7/bench_aead_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-no-asm-gcc-7", \
  '< grep -e "^\"OpenSSL" -e "^\"Provider" evercrypt-openssl-default-gcc-8/bench_aead_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-default-gcc-8", \
  '< grep -e "^\"OpenSSL" -e "^\"Provider" evercrypt-openssl-no-asm-gcc-8/bench_aead_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-no-asm-gcc-8", \
  '< grep -e "^\"OpenSSL" -e "^\"Provider" evercrypt-openssl-default-clang-7/bench_aead_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-default-clang-7", \
  '< grep -e "^\"OpenSSL" -e "^\"Provider" evercrypt-openssl-no-asm-clang-7/bench_aead_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-no-asm-clang-7", \
  '< grep -e "^\"OpenSSL" -e "^\"Provider" evercrypt-openssl-default-clang-8/bench_aead_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-default-clang-8", \
  '< grep -e "^\"OpenSSL" -e "^\"Provider" evercrypt-openssl-no-asm-clang-8/bench_aead_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-no-asm-clang-8"

set ylabel "Avg. performance [cycles/byte]"
unset yrange
unset xrange

set title "Ed25519 Performance (message size 65536 bytes)"
set output 'bench_meta_ed25519.pdf'
plot \
  'evercrypt-openssl-default-gcc-7/bench_ed25519_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-default-gcc-7", \
  'evercrypt-openssl-no-asm-gcc-7/bench_ed25519_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-no-asm-gcc-7", \
  'evercrypt-openssl-default-gcc-8/bench_ed25519_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-default-gcc-8", \
  'evercrypt-openssl-no-asm-gcc-8/bench_ed25519_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-no-asm-gcc-8", \
  'evercrypt-openssl-default-clang-7/bench_ed25519_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-default-clang-7", \
  'evercrypt-openssl-no-asm-clang-7/bench_ed25519_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-no-asm-clang-7", \
  'evercrypt-openssl-default-clang-8/bench_ed25519_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-default-clang-8", \
  'evercrypt-openssl-no-asm-clang-8/bench_ed25519_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-no-asm-clang-8"

set ylabel "Avg. performance [cycles/derivation]"
unset yrange

set title "Curve25519 Performance"
set output 'bench_meta_curve25519.pdf'
plot \
  'evercrypt-openssl-default-gcc-7/bench_curve25519.csv' using 'Avg':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-default-gcc-7", \
  'evercrypt-openssl-no-asm-gcc-7/bench_curve25519.csv' using 'Avg':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-no-asm-gcc-7", \
  'evercrypt-openssl-default-gcc-8/bench_curve25519.csv' using 'Avg':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-default-gcc-8", \
  'evercrypt-openssl-no-asm-gcc-8/bench_curve25519.csv' using 'Avg':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-no-asm-gcc-8", \
  'evercrypt-openssl-default-clang-7/bench_curve25519.csv' using 'Avg':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-default-clang-7", \
  'evercrypt-openssl-no-asm-clang-7/bench_curve25519.csv' using 'Avg':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-no-asm-clang-7", \
  'evercrypt-openssl-default-clang-8/bench_curve25519.csv' using 'Avg':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-default-clang-8", \
  'evercrypt-openssl-no-asm-clang-8/bench_curve25519.csv' using 'Avg':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-no-asm-clang-8"

set terminal svg size 1000, 500
set datafile separator ","
set datafile commentschars "//"
set xtics norotate
set style fill solid
set yrange[0:]
set key off
set boxwidth 0.8
set style histogram clustered gap 3 title
set style data histograms
set bmargin 3

set key right outside
set ylabel "Avg. performance [cycles/byte]"
set yrange [0:16]

set title "EverCrypt Hash Performance (message size 65536 bytes)"
set output 'bench_meta_hash_evercrypt.svg'
plot \
  '< grep -e "^\"EverCrypt" -e "^\"Provider" evercrypt-openssl-default-gcc-7/bench_hash_all_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-default-gcc-7", \
  '< grep -e "^\"EverCrypt" -e "^\"Provider" evercrypt-openssl-no-asm-gcc-7/bench_hash_all_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-no-asm-gcc-7", \
  '< grep -e "^\"EverCrypt" -e "^\"Provider" evercrypt-openssl-default-gcc-8/bench_hash_all_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-default-gcc-8", \
  '< grep -e "^\"EverCrypt" -e "^\"Provider" evercrypt-openssl-no-asm-gcc-8/bench_hash_all_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-no-asm-gcc-8", \
  '< grep -e "^\"EverCrypt" -e "^\"Provider" evercrypt-openssl-default-clang-7/bench_hash_all_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-default-clang-7", \
  '< grep -e "^\"EverCrypt" -e "^\"Provider" evercrypt-openssl-no-asm-clang-7/bench_hash_all_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-no-asm-clang-7", \
  '< grep -e "^\"EverCrypt" -e "^\"Provider" evercrypt-openssl-default-clang-8/bench_hash_all_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-default-clang-8", \
  '< grep -e "^\"EverCrypt" -e "^\"Provider" evercrypt-openssl-no-asm-clang-8/bench_hash_all_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-no-asm-clang-8"

set title "OpenSSL Hash Performance (message size 65536 bytes)"
set output 'bench_meta_hash_openssl.svg'
plot \
  '< grep -e "^\"OpenSSL" -e "^\"Provider" evercrypt-openssl-default-gcc-7/bench_hash_all_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-default-gcc-7", \
  '< grep -e "^\"OpenSSL" -e "^\"Provider" evercrypt-openssl-no-asm-gcc-7/bench_hash_all_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-no-asm-gcc-7", \
  '< grep -e "^\"OpenSSL" -e "^\"Provider" evercrypt-openssl-default-gcc-8/bench_hash_all_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-default-gcc-8", \
  '< grep -e "^\"OpenSSL" -e "^\"Provider" evercrypt-openssl-no-asm-gcc-8/bench_hash_all_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-no-asm-gcc-8", \
  '< grep -e "^\"OpenSSL" -e "^\"Provider" evercrypt-openssl-default-clang-7/bench_hash_all_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-default-clang-7", \
  '< grep -e "^\"OpenSSL" -e "^\"Provider" evercrypt-openssl-no-asm-clang-7/bench_hash_all_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-no-asm-clang-7", \
  '< grep -e "^\"OpenSSL" -e "^\"Provider" evercrypt-openssl-default-clang-8/bench_hash_all_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-default-clang-8", \
  '< grep -e "^\"OpenSSL" -e "^\"Provider" evercrypt-openssl-no-asm-clang-8/bench_hash_all_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-no-asm-clang-8"

set key right outside
set ylabel "Avg. performance [cycles/byte]"
set yrange [0:2]

set title "EverCrypt AEAD Performance (message size 65536 bytes)"
set output 'bench_meta_aead_evercrypt.svg'
plot \
  '< grep -e "^\"EverCrypt" -e "^\"Provider" evercrypt-openssl-default-gcc-7/bench_aead_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-default-gcc-7", \
  '< grep -e "^\"EverCrypt" -e "^\"Provider" evercrypt-openssl-no-asm-gcc-7/bench_aead_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-no-asm-gcc-7", \
  '< grep -e "^\"EverCrypt" -e "^\"Provider" evercrypt-openssl-default-gcc-8/bench_aead_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-default-gcc-8", \
  '< grep -e "^\"EverCrypt" -e "^\"Provider" evercrypt-openssl-no-asm-gcc-8/bench_aead_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-no-asm-gcc-8", \
  '< grep -e "^\"EverCrypt" -e "^\"Provider" evercrypt-openssl-default-clang-7/bench_aead_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-default-clang-7", \
  '< grep -e "^\"EverCrypt" -e "^\"Provider" evercrypt-openssl-no-asm-clang-7/bench_aead_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-no-asm-clang-7", \
  '< grep -e "^\"EverCrypt" -e "^\"Provider" evercrypt-openssl-default-clang-8/bench_aead_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-default-clang-8", \
  '< grep -e "^\"EverCrypt" -e "^\"Provider" evercrypt-openssl-no-asm-clang-8/bench_aead_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-no-asm-clang-8"

set title "OpenSSL AEAD Performance (message size 65536 bytes)"
set output 'bench_meta_aead_openssl.svg'
plot \
  '< grep -e "^\"OpenSSL" -e "^\"Provider" evercrypt-openssl-default-gcc-7/bench_aead_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-default-gcc-7", \
  '< grep -e "^\"OpenSSL" -e "^\"Provider" evercrypt-openssl-no-asm-gcc-7/bench_aead_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-no-asm-gcc-7", \
  '< grep -e "^\"OpenSSL" -e "^\"Provider" evercrypt-openssl-default-gcc-8/bench_aead_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-default-gcc-8", \
  '< grep -e "^\"OpenSSL" -e "^\"Provider" evercrypt-openssl-no-asm-gcc-8/bench_aead_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-no-asm-gcc-8", \
  '< grep -e "^\"OpenSSL" -e "^\"Provider" evercrypt-openssl-default-clang-7/bench_aead_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-default-clang-7", \
  '< grep -e "^\"OpenSSL" -e "^\"Provider" evercrypt-openssl-no-asm-clang-7/bench_aead_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-no-asm-clang-7", \
  '< grep -e "^\"OpenSSL" -e "^\"Provider" evercrypt-openssl-default-clang-8/bench_aead_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-default-clang-8", \
  '< grep -e "^\"OpenSSL" -e "^\"Provider" evercrypt-openssl-no-asm-clang-8/bench_aead_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-no-asm-clang-8"

set ylabel "Avg. performance [cycles/byte]"
unset yrange

set title "Ed25519 Performance (message size 65536 bytes)"
set output 'bench_meta_ed25519.svg'
plot \
  'evercrypt-openssl-default-gcc-7/bench_ed25519_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-default-gcc-7", \
  'evercrypt-openssl-no-asm-gcc-7/bench_ed25519_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-no-asm-gcc-7", \
  'evercrypt-openssl-default-gcc-8/bench_ed25519_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-default-gcc-8", \
  'evercrypt-openssl-no-asm-gcc-8/bench_ed25519_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-no-asm-gcc-8", \
  'evercrypt-openssl-default-clang-7/bench_ed25519_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-default-clang-7", \
  'evercrypt-openssl-no-asm-clang-7/bench_ed25519_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-no-asm-clang-7", \
  'evercrypt-openssl-default-clang-8/bench_ed25519_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-default-clang-8", \
  'evercrypt-openssl-no-asm-clang-8/bench_ed25519_65536.csv' using 'Avg Cycles/Byte':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-no-asm-clang-8"

set ylabel "Avg. performance [cycles/derivation]"
unset yrange

set title "Curve25519 Performance"
set output 'bench_meta_curve25519.svg'
plot \
  'evercrypt-openssl-default-gcc-7/bench_curve25519.csv' using 'Avg':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-default-gcc-7", \
  'evercrypt-openssl-no-asm-gcc-7/bench_curve25519.csv' using 'Avg':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-no-asm-gcc-7", \
  'evercrypt-openssl-default-gcc-8/bench_curve25519.csv' using 'Avg':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-default-gcc-8", \
  'evercrypt-openssl-no-asm-gcc-8/bench_curve25519.csv' using 'Avg':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-no-asm-gcc-8", \
  'evercrypt-openssl-default-clang-7/bench_curve25519.csv' using 'Avg':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-default-clang-7", \
  'evercrypt-openssl-no-asm-clang-7/bench_curve25519.csv' using 'Avg':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-no-asm-clang-7", \
  'evercrypt-openssl-default-clang-8/bench_curve25519.csv' using 'Avg':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-default-clang-8", \
  'evercrypt-openssl-no-asm-clang-8/bench_curve25519.csv' using 'Avg':xticlabels(strcol('Algorithm')) title "evercrypt-openssl-no-asm-clang-8"


Made this script work right

Made this script work right

git-svn-id: b233c5b81dcfbfdfca783093b3213ccfd2356b3a@548 3eb578c0-666c-0410-8428-3510748880ad

set terminal png
set yr[0:]
set output "../planar-axiall6b6.d0g1.d-3DF.png"
plot "../planar-axiall6b6.d0DF.txt" using 2:5 every ::33::43, "../analytical_data/BBR_axial_mix.txt" using 1:3 every ::33::43

set output "../planar-axiall6b6.d0g1.d-2DF.png"
plot "../planar-axiall6b6.d0DF.txt" using 2:5 every ::66::76, "../analytical_data/BBR_axial_mix.txt" using 1:3 every ::66::76

set output "../planar-axiall6b6.d0g1.d-1DF.png"
plot "../planar-axiall6b6.d0DF.txt" using 2:5 every ::99::108, "../analytical_data/BBR_axial_mix.txt" using 1:3 every ::99::108

set output "../planar-biaxiall6b6.d0g1.d-3DF.png"
plot "../planar-biaxiall6b6.d0DF.txt" using 2:5 every ::33::43, "../analytical_data/BBR_biaxial_mix.txt" using 1:3 every ::33::43

set output "../planar-biaxiall6b6.d0g1.d-2DF.png"
plot "../planar-biaxiall6b6.d0DF.txt" using 2:5 every ::66::76, "../analytical_data/BBR_biaxial_mix.txt" using 1:3 every ::66::76

set output "../planar-biaxiall6b6.d0g1.d-1DF.png"
plot "../planar-biaxiall6b6.d0DF.txt" using 2:5 every ::99::108, "../analytical_data/BBR_biaxial_mix.txt" using 1:3 every ::99::108

set terminal png
set yr[0:]
set output planar-axiall6b6.d0g1.d-3DF.png
plot "planar-axiall6b6.d0DF.txt" using 2:5 every ::33::43, "analytical_data/BBR_axial_mix.txt" using 1:3 every ::33::43

set output planar-axiall6b6.d0g1.d-2DF.png
plot "planar-axiall6b6.d0.txt" using 2:5 every ::66::76, "analytical_data/BBR_axial_mix.txt" using 1:3 every ::66::76

set output planar-axiall6b6.d0g1.d-1DF.png
plot "planar-axiall6b6.d0.txt" using 2:5 every ::99::108, "analytical_data/BBR_axial_mix.txt" using 1:3 every ::99::108

set output planar-biaxiall6b6.d0g1.d-3DF.png
plot "planar-biaxiall6b6.d0DF.txt" using 2:5 every ::33::43, "analytical_data/BBR_biaxial_mix.txt" using 1:3 every ::33::43

set output planar-biaxiall6b6.d0g1.d-2DF.png
plot "planar-biaxiall6b6.d0.txt" using 2:5 every ::66::76, "analytical_data/BBR_biaxial_mix.txt" using 1:3 every ::66::76

set output planar-biaxiall6b6.d0g1.d-1DF.png
plot "planar-biaxiall6b6.d0.txt" using 2:5 every ::99::108, "analytical_data/BBR_biaxial_mix.txt" using 1:3 every ::99::108


Fix http_headers UTs

Fix http_headers UTs

:- begin_tests(http_headers_v).
:- use_module(http_headers_v).

test(list_to_http_headers_v) :-

   Headers = [date = 'Tue, 03 Apr 2012 19:32:50 GMT',
              transfer_encoding = chunked],
   Headers_Ref = ['Date' = 'Tue, 03 Apr 2012 19:32:50 GMT',
                  'Transfer-Encoding' = chunked],
   http_headers_list_obj(Headers, Obj),
   obj_parents(Obj, Parents),
   assertion(Parents ==
            [http_general_headers_v, http_headers_v,
             object_v, object_base_v]),
   http_headers_list_obj(Headers2, Obj),
   assertion(Headers2 == Headers_Ref).

test(list_to_http_headers_v_functor_form) :-

   Headers = [date('Tue, 03 Apr 2012 19:32:50 GMT'),
              transfer_encoding(chunked)],
   Headers_Ref = ['Date' ='Tue, 03 Apr 2012 19:32:50 GMT',
                  'Transfer-Encoding' = chunked],
   http_headers_list_obj(Headers, Obj),
   obj_parents(Obj, Parents),
   assertion(Parents ==
            [http_general_headers_v, http_headers_v,
             object_v, object_base_v]),
   http_headers_list_obj(Headers2, Obj),
   assertion(Headers2 == Headers_Ref).

test(list_to_http_request_headers_v1) :-

   Headers = [date = 'Tue, 03 Apr 2012 19:32:50 GMT',
              accept = 'text/html',
              host = 'kogorta.dp.ua',
              transfer_encoding = chunked
              ],
   Headers_Ref = ['Date' ='Tue, 03 Apr 2012 19:32:50 GMT',
                  'Accept' = 'text/html',
                  'Host' = 'kogorta.dp.ua',
                  'Transfer-Encoding' = chunked
                 ],
   http_headers_list_obj(Headers, Obj),
   obj_parents(Obj, Parents),
   assertion(Parents ==
            [http_request_headers_v,
             http_general_headers_v,
             http_headers_v,
             object_v, object_base_v]),
   http_headers_list_obj(Headers2, Obj),
   sort(Headers_Ref, Headers1),
   assertion(Headers2 == Headers1).

test(list_to_http_request_headers_v2) :-

   Headers = [accept = 'text/html',
              date = 'Tue, 03 Apr 2012 19:32:50 GMT',
              host = 'kogorta.dp.ua',
              transfer_encoding = chunked
              ],
   Headers_Ref = ['Accept' = 'text/html',
                  'Date' ='Tue, 03 Apr 2012 19:32:50 GMT',
                  'Host' = 'kogorta.dp.ua',
                  'Transfer-Encoding' = chunked
                 ],
   http_headers_list_obj(Headers, Obj),
   obj_parents(Obj, Parents),
   assertion(Parents ==
            [http_request_headers_v,
             http_general_headers_v,
             http_headers_v,
             object_v, object_base_v]),
   http_headers_list_obj(Headers2, Obj),
   sort(Headers_Ref, Headers1),
   assertion(Headers2 == Headers1).

test(list_to_http_response_headers_v) :-

   Headers = [date = 'Tue, 03 Apr 2012 19:32:50 GMT',
              location = 'http://kogorta.dp.ua/'
              ],
   Headers_Ref = ['Date' = 'Tue, 03 Apr 2012 19:32:50 GMT',
                  'Location' = 'http://kogorta.dp.ua/'
                 ],
   http_headers_list_obj(Headers, Obj),
   obj_parents(Obj, Parents),
   assertion(Parents ==
            [http_response_headers_v,
             http_general_headers_v,
             http_headers_v,
             object_v, object_base_v]),
   http_headers_list_obj(Headers2, Obj),
   sort(Headers_Ref, Headers1),
   assertion(Headers2 == Headers1).

test(list_to_http_invalid_mixed_headers_v) :-

   Headers = [date = 'Tue, 03 Apr 2012 19:32:50 GMT',
              host = 'kogorta.dp.ua',
              location = 'http://kogorta.dp.ua/',
              transfer_encoding = chunked
              ],
   Headers_Ref = ['Date' ='Tue, 03 Apr 2012 19:32:50 GMT',
                  'Host' = 'kogorta.dp.ua',
                  'Location' = 'http://kogorta.dp.ua/',
                  'Transfer-Encoding' = chunked
                 ],
   http_headers_list_obj(Headers, Obj),
   obj_parents(Obj, Parents),
   assertion(Parents ==
            [
             http_invalid_mixed_headers_v,
             http_invalid_headers_v,
             http_response_headers_v,
             http_request_headers_v,
             http_general_headers_v,
             http_headers_v,
             object_v, object_base_v]),
   http_headers_list_obj(Headers2, Obj),
   sort(Headers_Ref, Headers1),
   assertion(Headers2 == Headers1).

test(list_to_http_invalid_bulk_headers_v1) :-

   Headers = [bulk1 = 1, '' = 3],
   Headers_Ref = ['Bulk1' = 1, '' = 3],
   http_headers_list_obj(Headers, Obj),
   obj_parents(Obj, Parents),
   assertion(Parents ==
            [
             http_invalid_bulk_headers_v,
             http_invalid_headers_v,
             http_headers_v,
             object_v, object_base_v]),
   http_headers_list_obj(Headers2, Obj),
   sort(Headers_Ref, Headers1),
   assertion(Headers2 == Headers1),
   obj_field(Obj, '@bulk', Bulk_Rev),
   reverse(Bulk_Rev, Bulk),
   assertion(Bulk == Headers).

test(list_to_http_invalid_bulk_headers_v2) :-

   Headers = [date = 'Tue, 03 Apr 2012 19:32:50 GMT',
              bulk1 = 1,
              transfer_encoding = chunked],
   Headers_Ref = ['Date' ='Tue, 03 Apr 2012 19:32:50 GMT',
                  'Bulk1' = 1,
                  'Transfer-Encoding' = chunked],
   http_headers_list_obj(Headers, Obj),
   obj_parents(Obj, Parents),
   assertion(Parents ==
            [
             http_invalid_bulk_headers_v,
             http_invalid_headers_v,
             http_general_headers_v,
             http_headers_v,
             object_v, object_base_v]),
   http_headers_list_obj(Headers20, Obj),
   msort(Headers20, Headers2),
   sort(Headers_Ref, Headers1),
   assertion(Headers2 == Headers1),
   obj_field(Obj, '@bulk', Bulk_Rev),
   reverse(Bulk_Rev, Bulk),
   assertion(Bulk == [bulk1 = 1]).

test(list_to_http_invalid_bulk_headers_v3) :-

   Headers = [date = 'Tue, 03 Apr 2012 19:32:50 GMT',
              accept = 'text/html',
              host = 'kogorta.dp.ua',
              transfer_encoding = chunked,
              bulk1 = 1
              ],
   Headers_Ref = ['Date' = 'Tue, 03 Apr 2012 19:32:50 GMT',
                  'Accept' = 'text/html',
                  'Host' = 'kogorta.dp.ua',
                  'Transfer-Encoding' = chunked,
                  'Bulk1' = 1
                 ],
   http_headers_list_obj(Headers, Obj),
   obj_parents(Obj, Parents),
   assertion(Parents ==
            [
             http_invalid_bulk_headers_v,
             http_invalid_headers_v,
             http_request_headers_v,
             http_general_headers_v,
             http_headers_v,
             object_v, object_base_v]),
   http_headers_list_obj(Headers20, Obj),
   msort(Headers20, Headers2),
   sort(Headers_Ref, Headers1),
   assertion(Headers2 == Headers1),
   obj_field(Obj, '@bulk', Bulk_Rev),
   reverse(Bulk_Rev, Bulk),
   assertion(Bulk == [bulk1 = 1]).

test(list_to_http_invalid_bulk_headers_v4) :-

   Headers = [bulk1 = 1,
              date = 'Tue, 03 Apr 2012 19:32:50 GMT',
              accept = 'text/html',
              host = 'kogorta.dp.ua',
              transfer_encoding = chunked
              ],
   Headers_Ref = ['Bulk1' = 1,
                  'Date' = 'Tue, 03 Apr 2012 19:32:50 GMT',
                  'Accept' = 'text/html',
                  'Host' = 'kogorta.dp.ua',
                  'Transfer-Encoding' = chunked
                 ],
   http_headers_list_obj(Headers, Obj),
   obj_parents(Obj, Parents),
   assertion(Parents ==
            [
             http_invalid_bulk_headers_v,
             http_invalid_headers_v,
             http_request_headers_v,
             http_general_headers_v,
             http_headers_v,
             object_v, object_base_v]),
   http_headers_list_obj(Headers20, Obj),
   msort(Headers20, Headers2),
   sort(Headers_Ref, Headers1),
   assertion(Headers2 == Headers1),
   obj_field(Obj, '@bulk', Bulk_Rev),
   reverse(Bulk_Rev, Bulk),
   assertion(Bulk == [bulk1 = 1]).

test(list_to_http_invalid_bulk_headers_v5) :-

   Headers = [bulk1 = 1,
              date = 'Tue, 03 Apr 2012 19:32:50 GMT',
              bulk2 = 2,
              host = 'kogorta.dp.ua',
              bulk3 = 3,
              location = 'http://kogorta.dp.ua/',
              bulk4 = 4,
              transfer_encoding = chunked,
              bulk5 = 5
              ],
   Headers_Ref = ['Bulk1' = 1,
                  'Date' = 'Tue, 03 Apr 2012 19:32:50 GMT',
                  'Bulk2' = 2,
                  'Host' = 'kogorta.dp.ua',
                  'Bulk3' = 3,
                  'Location' = 'http://kogorta.dp.ua/',
                  'Bulk4' = 4,
                  'Transfer-Encoding' = chunked,
                  'Bulk5' = 5
                 ],
   http_headers_list_obj(Headers, Obj),
   obj_parents(Obj, Parents),
   assertion(Parents ==
            [
             http_invalid_bulk_headers_v,
             http_invalid_mixed_headers_v,
             http_invalid_headers_v,
             http_response_headers_v,
             http_request_headers_v,
             http_general_headers_v,
             http_headers_v,
             object_v, object_base_v]),
   http_headers_list_obj(Headers20, Obj),
   msort(Headers20, Headers2),
   sort(Headers_Ref, Headers1),
   assertion(Headers2 == Headers1),
   obj_field(Obj, '@bulk', Bulk_Rev),
   reverse(Bulk_Rev, Bulk),
   assertion(Bulk ==
            [bulk1 = 1, bulk2 = 2, bulk3 = 3,
             bulk4 = 4, bulk5 = 5
            ]).

test(list_to_http_invalid_bulk_headers_v6) :-

   Headers = [date = 'Tue, 03 Apr 2012 19:32:50 GMT',
              bulk1 = 1,
              bulk2 = 2,
              host = 'kogorta.dp.ua',
              bulk3 = 3,
              location = 'http://kogorta.dp.ua/',
              bulk4 = 4,
              transfer_encoding = chunked,
              bulk5 = 5
              ],
   Headers_Ref = ['Date' = 'Tue, 03 Apr 2012 19:32:50 GMT',
                  'Bulk1' = 1,
                  'Bulk2' = 2,
                  'Host' = 'kogorta.dp.ua',
                  'Bulk3' = 3,
                  'Location' = 'http://kogorta.dp.ua/',
                  'Bulk4' = 4,
                  'Transfer-Encoding' = chunked,
                  'Bulk5' = 5
                 ],
   http_headers_list_obj(Headers, Obj),
   obj_parents(Obj, Parents),
   assertion(Parents ==
            [
             http_invalid_bulk_headers_v,
             http_invalid_mixed_headers_v,
             http_invalid_headers_v,
             http_response_headers_v,
             http_request_headers_v,
             http_general_headers_v,
             http_headers_v,
             object_v, object_base_v]),
   http_headers_list_obj(Headers20, Obj),
   msort(Headers20, Headers2),
   sort(Headers_Ref, Headers1),
   assertion(Headers2 == Headers1),
   obj_field(Obj, '@bulk', Bulk_Rev),
   reverse(Bulk_Rev, Bulk),
   assertion(Bulk ==
            [bulk1 = 1, bulk2 = 2, bulk3 = 3,
             bulk4 = 4, bulk5 = 5
            ]).

test(list_to_http_invalid_bulk_headers_v7) :-

   Headers = [
              date = 'Tue, 03 Apr 2012 19:32:50 GMT',
              host = 'kogorta.dp.ua',
              location = 'http://kogorta.dp.ua/',
              bulk1 = 1,
              bulk2 = 2,
              bulk3 = 3,
              bulk4 = 4,
              transfer_encoding = chunked,
              bulk5 = 5
              ],
   Headers_Ref = [
                  'Date' = 'Tue, 03 Apr 2012 19:32:50 GMT',
                  'Host' = 'kogorta.dp.ua',
                  'Location' = 'http://kogorta.dp.ua/',
                  'Bulk1' = 1,
                  'Bulk2' = 2,
                  'Bulk3' = 3,
                  'Bulk4' = 4,
                  'Transfer-Encoding' = chunked,
                  'Bulk5' = 5
                 ],
   http_headers_list_obj(Headers, Obj),
   obj_parents(Obj, Parents),
   assertion(Parents ==
            [
             http_invalid_bulk_headers_v,
             http_invalid_mixed_headers_v,
             http_invalid_headers_v,
             http_response_headers_v,
             http_request_headers_v,
             http_general_headers_v,
             http_headers_v,
             object_v, object_base_v]),
   http_headers_list_obj(Headers20, Obj),
   msort(Headers20, Headers2),
   sort(Headers_Ref, Headers1),
   assertion(Headers2 == Headers1),
   obj_field(Obj, '@bulk', Bulk_Rev),
   reverse(Bulk_Rev, Bulk),
   assertion(Bulk ==
            [bulk1 = 1, bulk2 = 2, bulk3 = 3,
             bulk4 = 4, bulk5 = 5
            ]).

test(repeated_headers1) :-

   Headers = [accept_language = en,
              accept_language = ru
              ],
   Headers_Ref = ['Accept-Language' = en,
                  'Accept-Language' = ru
                 ],
   http_headers_list_obj(Headers, Obj),
   obj_parents(Obj, Parents),
   assertion(Parents ==
            [http_request_headers_v, http_headers_v,
             object_v, object_base_v]),
   http_headers_list_obj(Headers2, Obj),
   assertion(Headers2 == Headers_Ref).

test(repeated_headers2) :-

   Headers = [accept_language = 'en, ru'],
   Headers_Ref = ['Accept-Language' = 'en, ru'],
   http_headers_list_obj(Headers, Obj),
   obj_parents(Obj, Parents),
   assertion(Parents ==
            [http_request_headers_v, http_headers_v,
             object_v, object_base_v]),
   http_headers_list_obj(Headers2, Obj),
   assertion(Headers2 == Headers_Ref).

test(repeated_headers3) :-

   Headers = [accept_language = [en, ru]],
   Headers_Ref = ['Accept-Language' = [en, ru]],
   http_headers_list_obj(Headers, Obj),
   obj_parents(Obj, Parents),
   assertion(Parents ==
            [http_request_headers_v, http_headers_v,
             object_v, object_base_v]),
   http_headers_list_obj(Headers2, Obj),
   assertion(Headers2 == Headers_Ref).

:- end_tests(http_headers_v).

:- begin_tests(http_headers_v).
:- use_module(http_headers_v).

test(list_to_http_headers_v) :-

   Headers = [date = 'Tue, 03 Apr 2012 19:32:50 GMT',
              transfer_encoding = chunked],
   http_headers_list_obj(Headers, Obj),
   obj_parents(Obj, Parents),
   assertion(Parents ==
            [http_general_headers_v, http_headers_v,
             object_v, object_base_v]),
   http_headers_list_obj(Headers2, Obj),
   assertion(Headers2 == Headers).

test(list_to_http_headers_v_functor_form) :-

   Headers = [date('Tue, 03 Apr 2012 19:32:50 GMT'),
              transfer_encoding(chunked)],
   Ref_Headers = [date = 'Tue, 03 Apr 2012 19:32:50 GMT',
                  transfer_encoding = chunked],
   http_headers_list_obj(Headers, Obj),
   obj_parents(Obj, Parents),
   assertion(Parents ==
            [http_general_headers_v, http_headers_v,
             object_v, object_base_v]),
   http_headers_list_obj(Headers2, Obj),
   assertion(Headers2 == Ref_Headers).

test(list_to_http_request_headers_v1) :-

   Headers = [date = 'Tue, 03 Apr 2012 19:32:50 GMT',
              accept = 'text/html',
              host = 'kogorta.dp.ua',
              transfer_encoding = chunked
              ],
   http_headers_list_obj(Headers, Obj),
   obj_parents(Obj, Parents),
   assertion(Parents ==
            [http_request_headers_v,
             http_general_headers_v,
             http_headers_v,
             object_v, object_base_v]),
   http_headers_list_obj(Headers2, Obj),
   sort(Headers, Headers1),
   assertion(Headers2 == Headers1).

test(list_to_http_request_headers_v2) :-

   Headers = [accept = 'text/html',
              date = 'Tue, 03 Apr 2012 19:32:50 GMT',
              host = 'kogorta.dp.ua',
              transfer_encoding = chunked
              ],
   http_headers_list_obj(Headers, Obj),
   obj_parents(Obj, Parents),
   assertion(Parents ==
            [http_request_headers_v,
             http_general_headers_v,
             http_headers_v,
             object_v, object_base_v]),
   http_headers_list_obj(Headers2, Obj),
   sort(Headers, Headers1),
   assertion(Headers2 == Headers1).

test(list_to_http_response_headers_v) :-

   Headers = [date = 'Tue, 03 Apr 2012 19:32:50 GMT',
              location = 'http://kogorta.dp.ua/'
              ],
   http_headers_list_obj(Headers, Obj),
   obj_parents(Obj, Parents),
   assertion(Parents ==
            [http_response_headers_v,
             http_general_headers_v,
             http_headers_v,
             object_v, object_base_v]),
   http_headers_list_obj(Headers2, Obj),
   sort(Headers, Headers1),
   assertion(Headers2 == Headers1).

test(list_to_http_invalid_mixed_headers_v) :-

   Headers = [date = 'Tue, 03 Apr 2012 19:32:50 GMT',
              host = 'kogorta.dp.ua',
              location = 'http://kogorta.dp.ua/',
              transfer_encoding = chunked
              ],
   http_headers_list_obj(Headers, Obj),
   obj_parents(Obj, Parents),
   assertion(Parents ==
            [
             http_invalid_mixed_headers_v,
             http_invalid_headers_v,
             http_response_headers_v,
             http_request_headers_v,
             http_general_headers_v,
             http_headers_v,
             object_v, object_base_v]),
   http_headers_list_obj(Headers2, Obj),
   sort(Headers, Headers1),
   assertion(Headers2 == Headers1).

test(list_to_http_invalid_bulk_headers_v1) :-

   Headers = [bulk1 = 1, '' = 3],
   http_headers_list_obj(Headers, Obj),
   obj_parents(Obj, Parents),
   assertion(Parents ==
            [
             http_invalid_bulk_headers_v,
             http_invalid_headers_v,
             http_headers_v,
             object_v, object_base_v]),
   http_headers_list_obj(Headers2, Obj),
   sort(Headers, Headers1),
   assertion(Headers2 == Headers1),
   obj_field(Obj, '@bulk', Bulk_Rev),
   reverse(Bulk_Rev, Bulk),
   assertion(Bulk == Headers).

test(list_to_http_invalid_bulk_headers_v2) :-

   Headers = [date = 'Tue, 03 Apr 2012 19:32:50 GMT',
              bulk1 = 1,
              transfer_encoding = chunked],
   http_headers_list_obj(Headers, Obj),
   obj_parents(Obj, Parents),
   assertion(Parents ==
            [
             http_invalid_bulk_headers_v,
             http_invalid_headers_v,
             http_general_headers_v,
             http_headers_v,
             object_v, object_base_v]),
   http_headers_list_obj(Headers20, Obj),
   msort(Headers20, Headers2),
   sort(Headers, Headers1),
   assertion(Headers2 == Headers1),
   obj_field(Obj, '@bulk', Bulk_Rev),
   reverse(Bulk_Rev, Bulk),
   assertion(Bulk == [bulk1 = 1]).

test(list_to_http_invalid_bulk_headers_v3) :-

   Headers = [date = 'Tue, 03 Apr 2012 19:32:50 GMT',
              accept = 'text/html',
              host = 'kogorta.dp.ua',
              transfer_encoding = chunked,
              bulk1 = 1
              ],
   http_headers_list_obj(Headers, Obj),
   obj_parents(Obj, Parents),
   assertion(Parents ==
            [
             http_invalid_bulk_headers_v,
             http_invalid_headers_v,
             http_request_headers_v,
             http_general_headers_v,
             http_headers_v,
             object_v, object_base_v]),
   http_headers_list_obj(Headers20, Obj),
   msort(Headers20, Headers2),
   sort(Headers, Headers1),
   assertion(Headers2 == Headers1),
   obj_field(Obj, '@bulk', Bulk_Rev),
   reverse(Bulk_Rev, Bulk),
   assertion(Bulk == [bulk1 = 1]).

test(list_to_http_invalid_bulk_headers_v4) :-

   Headers = [bulk1 = 1,
              date = 'Tue, 03 Apr 2012 19:32:50 GMT',
              accept = 'text/html',
              host = 'kogorta.dp.ua',
              transfer_encoding = chunked
              ],
   http_headers_list_obj(Headers, Obj),
   obj_parents(Obj, Parents),
   assertion(Parents ==
            [
             http_invalid_bulk_headers_v,
             http_invalid_headers_v,
             http_request_headers_v,
             http_general_headers_v,
             http_headers_v,
             object_v, object_base_v]),
   http_headers_list_obj(Headers20, Obj),
   msort(Headers20, Headers2),
   sort(Headers, Headers1),
   assertion(Headers2 == Headers1),
   obj_field(Obj, '@bulk', Bulk_Rev),
   reverse(Bulk_Rev, Bulk),
   assertion(Bulk == [bulk1 = 1]).

test(list_to_http_invalid_bulk_headers_v5) :-

   Headers = [bulk1 = 1,
              date = 'Tue, 03 Apr 2012 19:32:50 GMT',
              bulk2 = 2,
              host = 'kogorta.dp.ua',
              bulk3 = 3,
              location = 'http://kogorta.dp.ua/',
              bulk4 = 4,
              transfer_encoding = chunked,
              bulk5 = 5
              ],
   http_headers_list_obj(Headers, Obj),
   obj_parents(Obj, Parents),
   assertion(Parents ==
            [
             http_invalid_bulk_headers_v,
             http_invalid_mixed_headers_v,
             http_invalid_headers_v,
             http_response_headers_v,
             http_request_headers_v,
             http_general_headers_v,
             http_headers_v,
             object_v, object_base_v]),
   http_headers_list_obj(Headers20, Obj),
   msort(Headers20, Headers2),
   sort(Headers, Headers1),
   assertion(Headers2 == Headers1),
   obj_field(Obj, '@bulk', Bulk_Rev),
   reverse(Bulk_Rev, Bulk),
   assertion(Bulk ==
            [bulk1 = 1, bulk2 = 2, bulk3 = 3,
             bulk4 = 4, bulk5 = 5
            ]).

test(list_to_http_invalid_bulk_headers_v6) :-

   Headers = [date = 'Tue, 03 Apr 2012 19:32:50 GMT',
              bulk1 = 1,
              bulk2 = 2,
              host = 'kogorta.dp.ua',
              bulk3 = 3,
              location = 'http://kogorta.dp.ua/',
              bulk4 = 4,
              transfer_encoding = chunked,
              bulk5 = 5
              ],
   http_headers_list_obj(Headers, Obj),
   obj_parents(Obj, Parents),
   assertion(Parents ==
            [
             http_invalid_bulk_headers_v,
             http_invalid_mixed_headers_v,
             http_invalid_headers_v,
             http_response_headers_v,
             http_request_headers_v,
             http_general_headers_v,
             http_headers_v,
             object_v, object_base_v]),
   http_headers_list_obj(Headers20, Obj),
   msort(Headers20, Headers2),
   sort(Headers, Headers1),
   assertion(Headers2 == Headers1),
   obj_field(Obj, '@bulk', Bulk_Rev),
   reverse(Bulk_Rev, Bulk),
   assertion(Bulk ==
            [bulk1 = 1, bulk2 = 2, bulk3 = 3,
             bulk4 = 4, bulk5 = 5
            ]).

test(list_to_http_invalid_bulk_headers_v7) :-

   Headers = [
              date = 'Tue, 03 Apr 2012 19:32:50 GMT',
              host = 'kogorta.dp.ua',
              location = 'http://kogorta.dp.ua/',
              bulk1 = 1,
              bulk2 = 2,
              bulk3 = 3,
              bulk4 = 4,
              transfer_encoding = chunked,
              bulk5 = 5
              ],
   http_headers_list_obj(Headers, Obj),
   obj_parents(Obj, Parents),
   assertion(Parents ==
            [
             http_invalid_bulk_headers_v,
             http_invalid_mixed_headers_v,
             http_invalid_headers_v,
             http_response_headers_v,
             http_request_headers_v,
             http_general_headers_v,
             http_headers_v,
             object_v, object_base_v]),
   http_headers_list_obj(Headers20, Obj),
   msort(Headers20, Headers2),
   sort(Headers, Headers1),
   assertion(Headers2 == Headers1),
   obj_field(Obj, '@bulk', Bulk_Rev),
   reverse(Bulk_Rev, Bulk),
   assertion(Bulk ==
            [bulk1 = 1, bulk2 = 2, bulk3 = 3,
             bulk4 = 4, bulk5 = 5
            ]).

test(repeated_headers1) :-

   Headers = [accept_language = en,
              accept_language = ru
              ],
   http_headers_list_obj(Headers, Obj),
   obj_parents(Obj, Parents),
   assertion(Parents ==
            [http_request_headers_v, http_headers_v,
             object_v, object_base_v]),
   http_headers_list_obj(Headers2, Obj),
   assertion(Headers2 == Headers).

test(repeated_headers2) :-

   Headers = [accept_language = 'en, ru'],
   http_headers_list_obj(Headers, Obj),
   obj_parents(Obj, Parents),
   assertion(Parents ==
            [http_request_headers_v, http_headers_v,
             object_v, object_base_v]),
   http_headers_list_obj(Headers2, Obj),
   assertion(Headers2 == Headers).

test(repeated_headers3) :-

   Headers = [accept_language = [en, ru]],
   http_headers_list_obj(Headers, Obj),
   obj_parents(Obj, Parents),
   assertion(Parents ==
            [http_request_headers_v, http_headers_v,
             object_v, object_base_v]),
   http_headers_list_obj(Headers2, Obj),
   assertion(Headers2 == Headers).

:- end_tests(http_headers_v).


minor changes with v6.19plus

minor changes with v6.19plus

git-svn-id: 0ef30dc7da0b07cedfa074587325a6c153c0ae55@10528 fdbf22ae-c210-0410-be80-ca943da6b8f8


plot also number of files

plot also number of files

set terminal png medium size 800, 500
set output "linux-statistics.png"

set style data lines
set y2tics
set grid x y
set border
plot 'linux-statistics.txt' using 2:xticlabels(1) t 'size (M)', \
     'linux-statistics.txt' using 3:xticlabels(1) t 'number of files' axes x1y2

set terminal png medium size 800, 500
set output "linux-statistics.png"

set style data lines

set grid x y
set border
plot 'linux-statistics.txt' using 2:xticlabels(1) t 'size (M)'
#     'linux-statistics.txt' using 1:3 t 'number of files'


Hack gnuplot autoscaling

Hack gnuplot autoscaling


Match plot-abs colors to plot-rel and put key in better order

set for [lt=1:10] linetype lt lw 2
set style fill solid 0.25 noborder
set multiplot layout 2, 1
set lmargin at screen 0.15
set style data lines
set xlabel ''
set xtics format ''
set ylabel 'Heap size'
plot filename using 1:'H_a' lt 1, \
     '' using 1:'H_g' lt 2, \
     '' using 1:'H_T', \
     '' using 1:'H_m(n-1)', \
     '' using 1:'W_a', \
     '' using 1:'W_e'
set xlabel 'GC cycle'
set xtics format '% g'
set ylabel 'CPU'
set yrange [0:1]
plot [*:*] filename using 1:(column('u_assist')+column('u_bg')+column('u_idle')) title 'u_idle' w filledcurves y1=0, \
     '' using 1:(column('u_assist')+column('u_bg')) title 'u_bg' w filledcurves y1=0, \
     '' using 1:(column('u_assist')) title 'u_assist' w filledcurves y1=0, \
     '' using 1:'u_a' lt 1, \
     '' using 1:'u_g' lt 2
unset multiplot

set for [lt=1:10] linetype lt lw 2
set style fill solid 0.25 noborder
set multiplot layout 2, 1
set lmargin at screen 0.15
set style data lines
set xlabel ''
set xtics format ''
set ylabel 'Heap size'
plot filename using 1:'H_m(n-1)', \
     '' using 1:'H_T', \
     '' using 1:'H_a', \
     '' using 1:'H_g', \
     '' using 1:'W_a', \
     '' using 1:'W_e'
set xlabel 'GC cycle'
set xtics format '% g'
set ylabel 'CPU'
set yrange [0:1]
plot [*:*] filename using 1:(column('u_assist')+column('u_bg')+column('u_idle')) title 'u_idle' w filledcurves y1=0, \
     '' using 1:(column('u_assist')+column('u_bg')) title 'u_bg' w filledcurves y1=0, \
     '' using 1:(column('u_assist')) title 'u_assist' w filledcurves y1=0, \
     '' using 1:'u_a' lt 1, \
     '' using 1:'u_g' lt 2
unset multiplot


right margin fix

right margin fix

#!/usr/bin/env gnuplot

# graph of CPU temperature

# datafiles
ifnameh = "/tmp/lnxdiagd/mysql/sql11h.csv"
ifnamed = "/tmp/lnxdiagd/mysql/sql11d.csv"
ifnamew = "/tmp/lnxdiagd/mysql/sql11w.csv"
set output ofname = "/tmp/lnxdiagd/site/img/day11.png"

# ******************************************************* General settings *****
set terminal png truecolor enhanced font "Vera,9" size 1280,320
set datafile separator ';'
set datafile missing "NaN"    # Ignore missing values
set grid
tz_offset = utc_offset / 3600 # GNUplot only works with UTC. Need to compensate
                              # for timezone ourselves.
# Positions of split between graphs
LMPOS = 0.40
MRPOS = 0.75
RMARG = 0.96

# ********************************************************* Statistics (R) *****
# stats to be calculated here of column 2 (UX-epoch)
stats ifnameh using 2 name "X" nooutput

Xh_min = X_min + utc_offset - 946684800
Xh_max = X_max + utc_offset - 946684800

# stats to be calculated here for Y-axes
#stats ifnameh using 4 name "Y" nooutput
#Yh_min = Y_min * 0.90
#Yh_max = Y_max * 1.10

# ********************************************************* Statistics (M) *****
# stats to be calculated here of column 2 (UX-epoch)
stats ifnamed using 2 name "X" nooutput

Xd_min = X_min + utc_offset - 946684800
Xd_max = X_max + utc_offset - 946684800

# stats to be calculated here for Y-axes
#stats ifnamed using 4 name "Y" nooutput
#Yd_min = Y_min * 0.90
#Yd_max = Y_max * 1.10

# ********************************************************* Statistics (L) *****
# stats to be calculated here of column 2 (UX-epoch)
stats ifnamew using 2 name "X" nooutput
Xw_min = X_min + utc_offset - 946684800
Xw_max = X_max + utc_offset - 946684800

# stats for Y-axis
stats ifnamew using 4 name "Y" nooutput
Yw_min = Y_min -1
Yw_max = Y_max +1

set multiplot layout 1, 3 title "CPU Temperature ".strftime("( %Y-%m-%dT%H:%M )", time(0)+utc_offset)

# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#                                                       LEFT PLOT: past week
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

# ***************************************************************** X-axis *****
set xlabel "past week"       # X-axis label
set xdata time               # Data on X-axis should be interpreted as time
set timefmt "%s"             # Time in log-file is given in Unix format
set format x "%a %d"            # Display time in 24 hour notation on the X axis
set xrange [ Xw_min : Xw_max ]

# ***************************************************************** Y-axis *****
set ylabel "Temperature [degC]"
set yrange [ Yw_min : Yw_max ]

# ***************************************************************** Legend *****
set key inside top left horizontal box
set key samplen 1
set key reverse Left

# ***************************************************************** Output *****
# set arrow from graph 0,graph 0 to graph 0,graph 1 nohead lc rgb "red" front
# set arrow from graph 1,graph 0 to graph 1,graph 1 nohead lc rgb "green" front
#set object 1 rect from screen 0,0 to screen 1,1 behind
#set object 1 rect fc rgb "#eeeeee" fillstyle solid 1.0 noborder
#set object 2 rect from graph 0,0 to graph 1,1 behind
#set object 2 rect fc rgb "#ffffff" fillstyle solid 1.0 noborder

set rmargin at screen LMPOS

# ***** PLOT *****
plot ifnamew \
      using ($2+utc_offset):4 title " Temperature [degC]" with points pt 5 ps 0.2 fc rgb "#ccbb0000" \

# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#                                                     MIDDLE PLOT:  past day
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

# ***************************************************************** X-axis *****
set xlabel "past day"       # X-axis label
set xdata time               # Data on X-axis should be interpreted as time
set timefmt "%s"             # Time in log-file is given in Unix format
set format x "%R"            # Display time in 24 hour notation on the X axis
set xrange [ Xd_min : Xd_max ]

# ***************************************************************** Y-axis *****
set ylabel " "
set ytics format " "
set yrange [ Yw_min : Yw_max ]

# ***************************************************************** Legend *****
unset key

# ***************************************************************** Output *****
set lmargin at screen LMPOS+0.001
set rmargin at screen MRPOS

# ***** PLOT *****
plot ifnamed \
      using ($2+utc_offset):4 with points pt 5 ps 0.2 fc rgb "#ccbb0000" \

# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#                                                      RIGHT PLOT: past hour
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

# ***************************************************************** X-axis *****
set xlabel "past hour"       # X-axis label
set xdata time               # Data on X-axis should be interpreted as time
set timefmt "%s"             # Time in log-file is given in Unix format
set format x "%R"            # Display time in 24 hour notation on the X axis
set xrange [ Xh_min : Xh_max ]

# ***************************************************************** Y-axis *****
set ylabel " "
set ytics format " "
set yrange [ Yw_min : Yw_max ]

# ***************************************************************** Legend *****
unset key

# ***************************************************************** Output *****
set lmargin at screen MRPOS+0.001
set rmargin at screen RMARG

# ***** PLOT *****
plot ifnameh \
      using ($2+utc_offset):4 with points pt 5 ps 0.2 fc rgb "#ccbb0000" \

# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#                                                                 FINALIZING
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

unset multiplot

#!/usr/bin/env gnuplot

# graph of CPU temperature

# datafiles
ifnameh = "/tmp/lnxdiagd/mysql/sql11h.csv"
ifnamed = "/tmp/lnxdiagd/mysql/sql11d.csv"
ifnamew = "/tmp/lnxdiagd/mysql/sql11w.csv"
set output ofname = "/tmp/lnxdiagd/site/img/day11.png"

# ******************************************************* General settings *****
set terminal png truecolor enhanced font "Vera,9" size 1280,320
set datafile separator ';'
set datafile missing "NaN"    # Ignore missing values
set grid
tz_offset = utc_offset / 3600 # GNUplot only works with UTC. Need to compensate
                              # for timezone ourselves.
# Positions of split between graphs
LMPOS = 0.40
MRPOS = 0.75

# ********************************************************* Statistics (R) *****
# stats to be calculated here of column 2 (UX-epoch)
stats ifnameh using 2 name "X" nooutput

Xh_min = X_min + utc_offset - 946684800
Xh_max = X_max + utc_offset - 946684800

# stats to be calculated here for Y-axes
#stats ifnameh using 4 name "Y" nooutput
#Yh_min = Y_min * 0.90
#Yh_max = Y_max * 1.10

# ********************************************************* Statistics (M) *****
# stats to be calculated here of column 2 (UX-epoch)
stats ifnamed using 2 name "X" nooutput

Xd_min = X_min + utc_offset - 946684800
Xd_max = X_max + utc_offset - 946684800

# stats to be calculated here for Y-axes
#stats ifnamed using 4 name "Y" nooutput
#Yd_min = Y_min * 0.90
#Yd_max = Y_max * 1.10

# ********************************************************* Statistics (L) *****
# stats to be calculated here of column 2 (UX-epoch)
stats ifnamew using 2 name "X" nooutput
Xw_min = X_min + utc_offset - 946684800
Xw_max = X_max + utc_offset - 946684800

# stats for Y-axis
stats ifnamew using 4 name "Y" nooutput
Yw_min = Y_min -1
Yw_max = Y_max +1

set multiplot layout 1, 3 title "CPU Temperature ".strftime("( %Y-%m-%dT%H:%M )", time(0)+utc_offset)

# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#                                                       LEFT PLOT: past week
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

# ***************************************************************** X-axis *****
set xlabel "past week"       # X-axis label
set xdata time               # Data on X-axis should be interpreted as time
set timefmt "%s"             # Time in log-file is given in Unix format
set format x "%a %d"            # Display time in 24 hour notation on the X axis
set xrange [ Xw_min : Xw_max ]

# ***************************************************************** Y-axis *****
set ylabel "Temperature [degC]"
set yrange [ Yw_min : Yw_max ]

# ***************************************************************** Legend *****
set key inside top left horizontal box
set key samplen 1
set key reverse Left

# ***************************************************************** Output *****
# set arrow from graph 0,graph 0 to graph 0,graph 1 nohead lc rgb "red" front
# set arrow from graph 1,graph 0 to graph 1,graph 1 nohead lc rgb "green" front
#set object 1 rect from screen 0,0 to screen 1,1 behind
#set object 1 rect fc rgb "#eeeeee" fillstyle solid 1.0 noborder
#set object 2 rect from graph 0,0 to graph 1,1 behind
#set object 2 rect fc rgb "#ffffff" fillstyle solid 1.0 noborder

set rmargin at screen LMPOS

# ***** PLOT *****
plot ifnamew \
      using ($2+utc_offset):4 title " Temperature [degC]" with points pt 5 ps 0.2 fc rgb "#ccbb0000" \

# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#                                                     MIDDLE PLOT:  past day
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

# ***************************************************************** X-axis *****
set xlabel "past day"       # X-axis label
set xdata time               # Data on X-axis should be interpreted as time
set timefmt "%s"             # Time in log-file is given in Unix format
set format x "%R"            # Display time in 24 hour notation on the X axis
set xrange [ Xd_min : Xd_max ]

# ***************************************************************** Y-axis *****
set ylabel " "
set ytics format " "
set yrange [ Yw_min : Yw_max ]

# ***************************************************************** Legend *****
unset key

# ***************************************************************** Output *****
set lmargin at screen LMPOS+0.001
set rmargin at screen MRPOS

# ***** PLOT *****
plot ifnamed \
      using ($2+utc_offset):4 with points pt 5 ps 0.2 fc rgb "#ccbb0000" \

# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#                                                      RIGHT PLOT: past hour
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

# ***************************************************************** X-axis *****
set xlabel "past hour"       # X-axis label
set xdata time               # Data on X-axis should be interpreted as time
set timefmt "%s"             # Time in log-file is given in Unix format
set format x "%R"            # Display time in 24 hour notation on the X axis
set xrange [ Xh_min : Xh_max ]

# ***************************************************************** Y-axis *****
set ylabel " "
set ytics format " "
set yrange [ Yw_min : Yw_max ]

# ***************************************************************** Legend *****
unset key

# ***************************************************************** Output *****
set lmargin at screen MRPOS+0.001
set rmargin -1

# ***** PLOT *****
plot ifnameh \
      using ($2+utc_offset):4 with points pt 5 ps 0.2 fc rgb "#ccbb0000" \

# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#                                                                 FINALIZING
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

unset multiplot


20151231T1940

#!/usr/bin/gnuplot

set datafile separator ';'

# Title of the plot
set title "Test graph -`echo $TIMEZONEGAP`-"

# We want a grid
set grid

# Ignore missing values
#set datafile missing "NaN"

# X-axis label
set xlabel "Date/Time"

# set X-axis range to current date only
#set xrange ["$YESTERDAY":"$TODAY"]

# Y-axis ranges from 0 deg C to 100 deg C, same scale as for humidity
set yrange [15:20]

# Y2-axis set from 800 to 1200 kPa, used for barometric pressure
set autoscale y2

# place ticks on second Y2-axis
set y2tics border

# Title for Y-axis
set ylabel "Temperature [degC]"

# Title for Y2-axis
set y2label "Raw values [mV]"

# Define that data on X-axis should be interpreted as time
set xdata time

# Time in log-file is given in Unix format
set timefmt "%s"

# Display notation for time
set format x "%D\n%R"    # Display time in 24 hour notation on the X axis

# generate a legend which is placed underneath the plot
set key outside bottom center box title "--legend--"

# output into png file
set terminal png large
set output "/tmp/bonediagd/plot.png"

# Data columns are:
# 2 is Unix Epoch time
# 3 is TMP36 mV
# 4 is calculated temperature

# read data from file and generate plot
plot "/tmp/sql.csv" using ($2+3600):4 title "Temperature [degC]" with lines \
                ,"" using ($2+3600):3 title "Raw signal [mV]" with lines axes x1y2 \

#!/usr/bin/gnuplot

set datafile separator ';'

# Title of the plot
set title "Test graph -`echo $TIMEZONEGAP`-"

# We want a grid
set grid

# Ignore missing values
#set datafile missing "NaN"

# X-axis label
set xlabel "Date/Time"

# set X-axis range to current date only
#set xrange ["$YESTERDAY":"$TODAY"]

# Y-axis ranges from 0 deg C to 100 deg C, same scale as for humidity
set yrange [15:20]

# Y2-axis set from 800 to 1200 kPa, used for barometric pressure
set autoscale y2

# place ticks on second Y2-axis
set y2tics border

# Title for Y-axis
set ylabel "Temperature [degC]"

# Title for Y2-axis
set y2label "Raw values [mV]"

# Define that data on X-axis should be interpreted as time
set xdata time

# Time in log-file is given in Unix format
set timefmt "%s"

# Display notation for time
set format x "%D\n%R"    # Display time in 24 hour notation on the X axis

# generate a legend which is placed underneath the plot
set key outside bottom center box title "--legend--"

# output into png file
set terminal png large
set output "/tmp/bonediagd/plot.png"

# Data columns are:
# 2 is Unix Epoch time
# 3 is TMP36 mV
# 4 is calculated temperature

# read data from file and generate plot
plot "/tmp/sql.csv" using 2:4 title "Temperature [degC]" with lines \
                ,"" using 2:3 title "Raw signal [mV]" with lines axes x1y2 \


better y label

better y label

# expects 'fieldtype' variable to be defined on command line
#
# example: gnuplot -e 'fieldtype="long"' plot.gnuplot

set terminal png size 800,600 enhanced font "Helvetica,12"
set key top left

# same style for every line, just diff colors
set style line 1 pointtype 1
set style line 2 pointtype 1
set style line 3 pointtype 1
set style line 4 pointtype 1
set style line 5 pointtype 1
set style line 6 pointtype 1

x3(x) = (3 * x)
relerr(expected,observed) = abs(expected - observed) / expected
datafile(base) = "output/".base.".plotdata.tsv"

### plot the (real) value counts

set output 'output/'.fieldtype.'_num_values.png'

set xlabel "Num Values Expected (# Docs * 3)"
set ylabel "Num Values"

set title "Number of Values Found (".fieldtype." field)" noenhanced

plot datafile(fieldtype."_countdistinct") using (x3($1)):2 title "countDistinct" ls 1, \
     datafile(fieldtype."_cardinality=7") using (x3($1)):2 title "cardinality=0.7" ls 2, \
     datafile(fieldtype."_cardinality=5") using (x3($1)):2 title "cardinality=0.5" ls 3, \
     datafile(fieldtype."_cardinality=true") using (x3($1)):2 title "cardinality=true (0.3)" ls 4

### plot the relative error of the value counts

set output 'output/'.fieldtype.'_rel_error.png'

set xlabel "Num Values Expected (# Docs * 3)"
set ylabel "Relative Error"

set title "Compared to Expected: Relative Error of Value Counts (".fieldtype." field)" noenhanced

plot datafile(fieldtype."_countdistinct") using (x3($1)):(relerr(x3($1), $2)) title "countDistinct" ls 1, \
     datafile(fieldtype."_cardinality=7") using (x3($1)):(relerr(x3($1), $2)) title "cardinality=0.7" ls 2, \
     datafile(fieldtype."_cardinality=5") using (x3($1)):(relerr(x3($1), $2)) title "cardinality=0.5" ls 3, \
     datafile(fieldtype."_cardinality=true") using (x3($1)):(relerr(x3($1), $2)) title "cardinality=true (0.3)" ls 4

### plot the the timing data

set output 'output/'.fieldtype.'_timing.png'

set xlabel "Num Values Expected (# Docs * 3)"
set ylabel "Mean Req Time (sec) w/stddev error bars"

set title "Request Time (".fieldtype." field)" noenhanced

plot datafile(fieldtype."_countdistinct") using (x3($1)):3:4 with errorbars title "countDistinct" ls 1, \
     datafile(fieldtype."_cardinality=7") using (x3($1)):3:4 with errorbars title "cardinality=0.7" ls 2, \
     datafile(fieldtype."_cardinality=5") using (x3($1)):3:4 with errorbars title "cardinality=0.5" ls 3, \
     datafile(fieldtype."_cardinality=true") using (x3($1)):3:4 with errorbars title "cardinality=true (0.3)" ls 4

# crop some of the really noisy data so detail is more clear
set xrange [20000:]
set yrange [0:4]
set output 'output/'.fieldtype.'_timing_cropped.png'

set title "Request Time (".fieldtype." field, cropped)" noenhanced
replot

# expects 'fieldtype' variable to be defined on command line
#
# example: gnuplot -e 'fieldtype="long"' plot.gnuplot

set terminal png size 800,600 enhanced font "Helvetica,12"
set key top left

# same style for every line, just diff colors
set style line 1 pointtype 1
set style line 2 pointtype 1
set style line 3 pointtype 1
set style line 4 pointtype 1
set style line 5 pointtype 1
set style line 6 pointtype 1

x3(x) = (3 * x)
relerr(expected,observed) = abs(expected - observed) / expected
datafile(base) = "output/".base.".plotdata.tsv"

### plot the (real) value counts

set output 'output/'.fieldtype.'_num_values.png'

set xlabel "Num Values Expected (# Docs * 3)"
set ylabel "Num Values"

set title "Number of Values Found (".fieldtype." field)" noenhanced

plot datafile(fieldtype."_countdistinct") using (x3($1)):2 title "countDistinct" ls 1, \
     datafile(fieldtype."_cardinality=7") using (x3($1)):2 title "cardinality=0.7" ls 2, \
     datafile(fieldtype."_cardinality=5") using (x3($1)):2 title "cardinality=0.5" ls 3, \
     datafile(fieldtype."_cardinality=true") using (x3($1)):2 title "cardinality=true (0.3)" ls 4

### plot the relative error of the value counts

set output 'output/'.fieldtype.'_rel_error.png'

set xlabel "Num Values Expected (# Docs * 3)"
set ylabel "Relative Error"

set title "Compared to Expected: Relative Error of Value Counts (".fieldtype." field)" noenhanced

plot datafile(fieldtype."_countdistinct") using (x3($1)):(relerr(x3($1), $2)) title "countDistinct" ls 1, \
     datafile(fieldtype."_cardinality=7") using (x3($1)):(relerr(x3($1), $2)) title "cardinality=0.7" ls 2, \
     datafile(fieldtype."_cardinality=5") using (x3($1)):(relerr(x3($1), $2)) title "cardinality=0.5" ls 3, \
     datafile(fieldtype."_cardinality=true") using (x3($1)):(relerr(x3($1), $2)) title "cardinality=true (0.3)" ls 4

### plot the the timing data

set output 'output/'.fieldtype.'_timing.png'

set xlabel "Num Values Expected (# Docs * 3)"
set ylabel "Req Time (sec)"

set title "Request Time (".fieldtype." field)" noenhanced

plot datafile(fieldtype."_countdistinct") using (x3($1)):3:4 with errorbars title "countDistinct" ls 1, \
     datafile(fieldtype."_cardinality=7") using (x3($1)):3:4 with errorbars title "cardinality=0.7" ls 2, \
     datafile(fieldtype."_cardinality=5") using (x3($1)):3:4 with errorbars title "cardinality=0.5" ls 3, \
     datafile(fieldtype."_cardinality=true") using (x3($1)):3:4 with errorbars title "cardinality=true (0.3)" ls 4

# crop some of the really noisy data so detail is more clear
set xrange [20000:]
set yrange [0:4]
set output 'output/'.fieldtype.'_timing_cropped.png'

set title "Request Time (".fieldtype." field, cropped)" noenhanced
replot


define fonts

define fonts

#!/usr/bin/gnuplot -persist
#
#
#    	G N U P L O T
#    	Version 4.2 patchlevel 3
#    	last modified Mar 2008
#    	System: Linux 2.6.25-gentoo-r6
#
#    	Copyright (C) 1986 - 1993, 1998, 2004, 2007, 2008
#    	Thomas Williams, Colin Kelley and many others
#
#    	Type `help` to access the on-line reference manual.
#    	The gnuplot FAQ is available from http://www.gnuplot.info/faq/
#
#    	Send bug reports and suggestions to <http://sourceforge.net/projects/gnuplot>
#
set terminal png medium font '/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansCondensed.ttf,13' size 1280,800
set output "result.png"
unset clip points
set clip one
unset clip two
set bar 1.000000
set border 31 front linetype -1 linewidth 1.000
set xdata
set ydata
set zdata
set x2data
set y2data
set timefmt x "%d/%m/%y,%H:%M"
set timefmt y "%d/%m/%y,%H:%M"
set timefmt z "%d/%m/%y,%H:%M"
set timefmt x2 "%d/%m/%y,%H:%M"
set timefmt y2 "%d/%m/%y,%H:%M"
set timefmt cb "%d/%m/%y,%H:%M"
set boxwidth
set style fill  empty border
set style rectangle back fc lt -3 fillstyle  solid 1.00 border -1
set dummy x,y
set format x "% g"
set format y "% g"
set format x2 "% g"
set format y2 "% g"
set format z "% g"
set format cb "% g"
set angles radians
set grid
set key title ""
set key inside right top vertical Right noreverse enhanced autotitles nobox
set key noinvert samplen 4 spacing 1 width 0 height 0
unset label
unset arrow
set style increment default
unset style line
unset style arrow
set style histogram clustered gap 2 title  offset character 0, 0, 0
unset logscale
set offsets 0, 0, 0, 0
set pointsize 1
set encoding default
unset polar
unset parametric
unset decimalsign
set view 60, 30, 1, 1
set samples 100, 100
set isosamples 10, 10
set surface
unset contour
set clabel '%8.3g'
set mapping cartesian
set datafile separator whitespace
unset hidden3d
set cntrparam order 4
set cntrparam linear
set cntrparam levels auto 5
set cntrparam points 5
set size ratio 0 1,1
set origin 0,0
set style data points
set style function lines
set xzeroaxis linetype -2 linewidth 1.000
set yzeroaxis linetype -2 linewidth 1.000
set zzeroaxis linetype -2 linewidth 1.000
set x2zeroaxis linetype -2 linewidth 1.000
set y2zeroaxis linetype -2 linewidth 1.000
set ticslevel 0.5
set mxtics default
set mytics default
set mztics default
set mx2tics default
set my2tics default
set mcbtics default
set xtics border in scale 1,0.5 mirror norotate  offset character 0, 0, 0
set xtics autofreq
set ytics border in scale 1,0.5 mirror norotate  offset character 0, 0, 0
set ytics autofreq
set ztics border in scale 1,0.5 nomirror norotate  offset character 0, 0, 0
set ztics autofreq
set nox2tics
set noy2tics
set cbtics border in scale 1,0.5 mirror norotate  offset character 0, 0, 0
set cbtics autofreq
set title "game count - win rate curve"
set title  offset character 0, 0, 0 font "" norotate
set timestamp bottom
set timestamp ""
set timestamp  offset character 0, 0, 0 font "" norotate
set rrange [ * : * ] noreverse nowriteback  # (currently [0.00000:10.0000] )
set trange [ * : * ] noreverse nowriteback  # (currently [-5.00000:5.00000] )
set urange [ * : * ] noreverse nowriteback  # (currently [-5.00000:5.00000] )
set vrange [ * : * ] noreverse nowriteback  # (currently [-5.00000:5.00000] )
set xlabel "game_count"
set xlabel  offset character 0, 0, 0 font "" textcolor lt -1 norotate
set x2label ""
set x2label  offset character 0, 0, 0 font "" textcolor lt -1 norotate
set xrange [ * : * ] noreverse nowriteback  # (currently [-10.0000:10.0000] )
set x2range [ * : * ] noreverse nowriteback  # (currently [-10.0000:10.0000] )
set ylabel "rate"
set ylabel  offset character 0, 0, 0 font "" textcolor lt -1 rotate by 90
set y2label ""
set y2label  offset character 0, 0, 0 font "" textcolor lt -1 rotate by 90
set yrange [ * : * ] noreverse nowriteback  # (currently [-10.0000:10.0000] )
set y2range [ * : * ] noreverse nowriteback  # (currently [-10.0000:10.0000] )
set zlabel ""
set zlabel  offset character 0, 0, 0 font "" textcolor lt -1 norotate
set zrange [ * : * ] noreverse nowriteback  # (currently [-10.0000:10.0000] )
set cblabel ""
set cblabel  offset character 0, 0, 0 font "" textcolor lt -1 rotate by 90
set cbrange [ * : * ] noreverse nowriteback  # (currently [-10.0000:10.0000] )
set zero 1e-08
set lmargin -1
set bmargin -1
set rmargin -1
set tmargin -1
set locale "C"
set pm3d explicit at s
set pm3d scansautomatic
set pm3d interpolate 1,1 flush begin noftriangles nohidden3d corners2color mean
set palette positive nops_allcF maxcolors 0 gamma 1.5 color model RGB
set palette rgbformulae 7, 5, 15
set colorbox default
set colorbox vertical origin screen 0.9, 0.2, 0 size screen 0.05, 0.6, 0 front bdefault
set loadpath
set fontpath
set fit noerrorvariables
show grid
plot 'plot' u 1:2 w l title "win rate", 'plot' u 1:3 w l title "expected win rate"
#    EOF

#!/usr/bin/gnuplot -persist
#
#
#    	G N U P L O T
#    	Version 4.2 patchlevel 3
#    	last modified Mar 2008
#    	System: Linux 2.6.25-gentoo-r6
#
#    	Copyright (C) 1986 - 1993, 1998, 2004, 2007, 2008
#    	Thomas Williams, Colin Kelley and many others
#
#    	Type `help` to access the on-line reference manual.
#    	The gnuplot FAQ is available from http://www.gnuplot.info/faq/
#
#    	Send bug reports and suggestions to <http://sourceforge.net/projects/gnuplot>
#
set terminal png medium size 1280,800
set output "result.png"
unset clip points
set clip one
unset clip two
set bar 1.000000
set border 31 front linetype -1 linewidth 1.000
set xdata
set ydata
set zdata
set x2data
set y2data
set timefmt x "%d/%m/%y,%H:%M"
set timefmt y "%d/%m/%y,%H:%M"
set timefmt z "%d/%m/%y,%H:%M"
set timefmt x2 "%d/%m/%y,%H:%M"
set timefmt y2 "%d/%m/%y,%H:%M"
set timefmt cb "%d/%m/%y,%H:%M"
set boxwidth
set style fill  empty border
set style rectangle back fc lt -3 fillstyle  solid 1.00 border -1
set dummy x,y
set format x "% g"
set format y "% g"
set format x2 "% g"
set format y2 "% g"
set format z "% g"
set format cb "% g"
set angles radians
set grid
set key title ""
set key inside right top vertical Right noreverse enhanced autotitles nobox
set key noinvert samplen 4 spacing 1 width 0 height 0
unset label
unset arrow
set style increment default
unset style line
unset style arrow
set style histogram clustered gap 2 title  offset character 0, 0, 0
unset logscale
set offsets 0, 0, 0, 0
set pointsize 1
set encoding default
unset polar
unset parametric
unset decimalsign
set view 60, 30, 1, 1
set samples 100, 100
set isosamples 10, 10
set surface
unset contour
set clabel '%8.3g'
set mapping cartesian
set datafile separator whitespace
unset hidden3d
set cntrparam order 4
set cntrparam linear
set cntrparam levels auto 5
set cntrparam points 5
set size ratio 0 1,1
set origin 0,0
set style data points
set style function lines
set xzeroaxis linetype -2 linewidth 1.000
set yzeroaxis linetype -2 linewidth 1.000
set zzeroaxis linetype -2 linewidth 1.000
set x2zeroaxis linetype -2 linewidth 1.000
set y2zeroaxis linetype -2 linewidth 1.000
set ticslevel 0.5
set mxtics default
set mytics default
set mztics default
set mx2tics default
set my2tics default
set mcbtics default
set xtics border in scale 1,0.5 mirror norotate  offset character 0, 0, 0
set xtics autofreq
set ytics border in scale 1,0.5 mirror norotate  offset character 0, 0, 0
set ytics autofreq
set ztics border in scale 1,0.5 nomirror norotate  offset character 0, 0, 0
set ztics autofreq
set nox2tics
set noy2tics
set cbtics border in scale 1,0.5 mirror norotate  offset character 0, 0, 0
set cbtics autofreq
set title "game count - win rate curve"
set title  offset character 0, 0, 0 font "" norotate
set timestamp bottom
set timestamp ""
set timestamp  offset character 0, 0, 0 font "" norotate
set rrange [ * : * ] noreverse nowriteback  # (currently [0.00000:10.0000] )
set trange [ * : * ] noreverse nowriteback  # (currently [-5.00000:5.00000] )
set urange [ * : * ] noreverse nowriteback  # (currently [-5.00000:5.00000] )
set vrange [ * : * ] noreverse nowriteback  # (currently [-5.00000:5.00000] )
set xlabel "game_count"
set xlabel  offset character 0, 0, 0 font "" textcolor lt -1 norotate
set x2label ""
set x2label  offset character 0, 0, 0 font "" textcolor lt -1 norotate
set xrange [ * : * ] noreverse nowriteback  # (currently [-10.0000:10.0000] )
set x2range [ * : * ] noreverse nowriteback  # (currently [-10.0000:10.0000] )
set ylabel "rate"
set ylabel  offset character 0, 0, 0 font "" textcolor lt -1 rotate by 90
set y2label ""
set y2label  offset character 0, 0, 0 font "" textcolor lt -1 rotate by 90
set yrange [ * : * ] noreverse nowriteback  # (currently [-10.0000:10.0000] )
set y2range [ * : * ] noreverse nowriteback  # (currently [-10.0000:10.0000] )
set zlabel ""
set zlabel  offset character 0, 0, 0 font "" textcolor lt -1 norotate
set zrange [ * : * ] noreverse nowriteback  # (currently [-10.0000:10.0000] )
set cblabel ""
set cblabel  offset character 0, 0, 0 font "" textcolor lt -1 rotate by 90
set cbrange [ * : * ] noreverse nowriteback  # (currently [-10.0000:10.0000] )
set zero 1e-08
set lmargin -1
set bmargin -1
set rmargin -1
set tmargin -1
set locale "C"
set pm3d explicit at s
set pm3d scansautomatic
set pm3d interpolate 1,1 flush begin noftriangles nohidden3d corners2color mean
set palette positive nops_allcF maxcolors 0 gamma 1.5 color model RGB
set palette rgbformulae 7, 5, 15
set colorbox default
set colorbox vertical origin screen 0.9, 0.2, 0 size screen 0.05, 0.6, 0 front bdefault
set loadpath
set fontpath
set fit noerrorvariables
show grid
plot 'plot' u 1:2 w l title "win rate", 'plot' u 1:3 w l title "expected win rate"
#    EOF