Rename test

Rename test

:- include(bson(include/common)).

:- begin_tests('bson:docs_bytes/2').

test('no docs', [true(Got == Expected)]) :-
    Expected = [],
    Bytes = [],
    bson:docs_bytes(Expected, Bytes),
    bson:docs_bytes(Got, Bytes).

test('several complex docs back-and-forth', [true(Got == Expected)]) :-
    Doc =
    [
        k01 - -5.05,
        k02 - åäö_string, % Atoms only (no code lists).
        k03 - [],
        k04 - [k1-v1, k2-v2],
        k05 - [v1,v2,v3],
        k06 - binary(generic,[1,2,3]),
        k07 - binary(function,[1,2,3]),
        k08 - binary(old_generic,[1,2,3]),
        k09 - binary(uuid_old,[1,2,3]),
        k10 - binary(uuid,[1,2,3]),
        k11 - binary(md5,[1,2,3]),
        k12 - binary(user_defined,[1,2,3]),
        k13 - +undefined,
        k14 - object_id('47cc67093475061e3d95369d'),
        k15 - +false,
        k16 - +true,
        k17 - utc(1302354660284),
        k18 - +null,
        k19 - regex('pattern','options'),
        k20 - db_pointer('string','47cc67093475061e3d95369d'),
        k21 - js('code'),
        k22 - symbol(åäö_string), % Just like atoms.
        k23 - js('code',[mappings-doc]),
        k24 - 32,
        k25 - mongostamp(0),
        k26 - 9223372036854775807,
        k27 - +min,
        k28 - +max
    ],
    Expected =
    [
        Doc,
        Doc
    ],
    bson:docs_bytes(Expected, Bytes),
    bson:docs_bytes(Got, Bytes).

:- end_tests('bson:docs_bytes/2').

:- begin_tests('bson:doc_bytes/2').

test('nonvar, nonvar') :-
    Doc =
    [
        hello - 256
    ],
    Bytes =
    [
        16,0,0,0, % Length of top doc.
        0x10, % Tag.
            104,101,108,108,111, 0, % Ename.
            0,1,0,0, % Int32 data.
        0 % End of top doc.
    ],
    bson:doc_bytes(Doc, Bytes).

test('nonvar, var', [true(Got == Expected)]) :-
    Doc =
    [
        hello - 256
    ],
    Expected =
    [
        16,0,0,0, % Length of top doc.
        0x10, % Tag.
            104,101,108,108,111, 0, % Ename.
            0,1,0,0, % Int32 data.
        0 % End of top doc.
    ],
    bson:doc_bytes(Doc, Got).

test('var, nonvar', [true(Got == Expected)]) :-
    Expected =
    [
        hello - 256
    ],
    Bytes =
    [
        16,0,0,0, % Length of top doc.
        0x10, % Tag.
            104,101,108,108,111, 0, % Ename.
            0,1,0,0, % Int32 data.
        0 % End of top doc.
    ],
    bson:doc_bytes(Got, Bytes).

test('var, var', [throws(bson_error(_Description, _EnvList))]) :-
    bson:doc_bytes(_, _).

test('complex doc back-and-forth', [true(Got == Expected)]) :-
    Expected =
    [
        k01 - -5.05,
        k02 - åäö_string, % Atoms only (no code lists).
        k03 - [],
        k04 - [k1-v1, k2-v2],
        k05 - [v1,v2,v3],
        k06 - binary(generic,[1,2,3]),
        k07 - binary(function,[1,2,3]),
        k08 - binary(old_generic,[1,2,3]),
        k09 - binary(uuid_old,[1,2,3]),
        k10 - binary(uuid,[1,2,3]),
        k11 - binary(md5,[1,2,3]),
        k12 - binary(user_defined,[1,2,3]),
        k13 - +undefined,
        k14 - object_id('47cc67093475061e3d95369d'),
        k15 - +false,
        k16 - +true,
        k17 - utc(1302354660284),
        k18 - +null,
        k19 - regex('pattern','options'),
        k20 - db_pointer('string','47cc67093475061e3d95369d'),
        k21 - js('code'),
        k22 - symbol(åäö_string), % Just like atoms.
        k23 - js('code',[mappings-doc]),
        k24 - 32,
        k25 - mongostamp(0),
        k26 - 9223372036854775807,
        k27 - +min,
        k28 - +max
    ],
    bson:doc_bytes(Expected, Bytes),
    bson:doc_bytes(Got, Bytes).

:- end_tests('bson:doc_bytes/2').

:- include(bson(include/common)).

:- begin_tests('bson:docs_bytes/2').

test('no docs', [true(Got == Expected)]) :-
    Expected = [],
    Bytes = [],
    bson:docs_bytes(Expected, Bytes),
    bson:docs_bytes(Got, Bytes).

test('complex doc back-and-forth', [true(Got == Expected)]) :-
    Doc =
    [
        k01 - -5.05,
        k02 - åäö_string, % Atoms only (no code lists).
        k03 - [],
        k04 - [k1-v1, k2-v2],
        k05 - [v1,v2,v3],
        k06 - binary(generic,[1,2,3]),
        k07 - binary(function,[1,2,3]),
        k08 - binary(old_generic,[1,2,3]),
        k09 - binary(uuid_old,[1,2,3]),
        k10 - binary(uuid,[1,2,3]),
        k11 - binary(md5,[1,2,3]),
        k12 - binary(user_defined,[1,2,3]),
        k13 - +undefined,
        k14 - object_id('47cc67093475061e3d95369d'),
        k15 - +false,
        k16 - +true,
        k17 - utc(1302354660284),
        k18 - +null,
        k19 - regex('pattern','options'),
        k20 - db_pointer('string','47cc67093475061e3d95369d'),
        k21 - js('code'),
        k22 - symbol(åäö_string), % Just like atoms.
        k23 - js('code',[mappings-doc]),
        k24 - 32,
        k25 - mongostamp(0),
        k26 - 9223372036854775807,
        k27 - +min,
        k28 - +max
    ],
    Expected =
    [
        Doc,
        Doc
    ],
    bson:docs_bytes(Expected, Bytes),
    bson:docs_bytes(Got, Bytes).

:- end_tests('bson:docs_bytes/2').

:- begin_tests('bson:doc_bytes/2').

test('nonvar, nonvar') :-
    Doc =
    [
        hello - 256
    ],
    Bytes =
    [
        16,0,0,0, % Length of top doc.
        0x10, % Tag.
            104,101,108,108,111, 0, % Ename.
            0,1,0,0, % Int32 data.
        0 % End of top doc.
    ],
    bson:doc_bytes(Doc, Bytes).

test('nonvar, var', [true(Got == Expected)]) :-
    Doc =
    [
        hello - 256
    ],
    Expected =
    [
        16,0,0,0, % Length of top doc.
        0x10, % Tag.
            104,101,108,108,111, 0, % Ename.
            0,1,0,0, % Int32 data.
        0 % End of top doc.
    ],
    bson:doc_bytes(Doc, Got).

test('var, nonvar', [true(Got == Expected)]) :-
    Expected =
    [
        hello - 256
    ],
    Bytes =
    [
        16,0,0,0, % Length of top doc.
        0x10, % Tag.
            104,101,108,108,111, 0, % Ename.
            0,1,0,0, % Int32 data.
        0 % End of top doc.
    ],
    bson:doc_bytes(Got, Bytes).

test('var, var', [throws(bson_error(_Description, _EnvList))]) :-
    bson:doc_bytes(_, _).

test('complex doc back-and-forth', [true(Got == Expected)]) :-
    Expected =
    [
        k01 - -5.05,
        k02 - åäö_string, % Atoms only (no code lists).
        k03 - [],
        k04 - [k1-v1, k2-v2],
        k05 - [v1,v2,v3],
        k06 - binary(generic,[1,2,3]),
        k07 - binary(function,[1,2,3]),
        k08 - binary(old_generic,[1,2,3]),
        k09 - binary(uuid_old,[1,2,3]),
        k10 - binary(uuid,[1,2,3]),
        k11 - binary(md5,[1,2,3]),
        k12 - binary(user_defined,[1,2,3]),
        k13 - +undefined,
        k14 - object_id('47cc67093475061e3d95369d'),
        k15 - +false,
        k16 - +true,
        k17 - utc(1302354660284),
        k18 - +null,
        k19 - regex('pattern','options'),
        k20 - db_pointer('string','47cc67093475061e3d95369d'),
        k21 - js('code'),
        k22 - symbol(åäö_string), % Just like atoms.
        k23 - js('code',[mappings-doc]),
        k24 - 32,
        k25 - mongostamp(0),
        k26 - 9223372036854775807,
        k27 - +min,
        k28 - +max
    ],
    bson:doc_bytes(Expected, Bytes),
    bson:doc_bytes(Got, Bytes).

:- end_tests('bson:doc_bytes/2').


updating tracing gnuplot script

updating tracing gnuplot script

#-- alltrace.gnuplot

set title "HMC-SIM"
set xlabel "Clock Tick"
set ylabel "Count"
#set ytics "10"
set term png
set output "1024.png"

plot "bank_conflict.out" title "Bank Conflicts" with linespoints,\
     "xbar_latency.out" title "XBAR Latency" with linespoints,\
     "xbar_rqst_stall.out" title "XBAR Request Stall" with linespoints,\
     "rd64.out" title "RD64 CMD" with linespoints,\
     "wr64.out" title "WR64 CMD" with linespoints

#-- alltrace.gnuplot

set title "HMC-SIM"
set xlabel "Clock Tick"
set ylabel "Count"
set ytics "10"
set term png
set output "1024.png"

plot "bank_conflict.out" title "Bank Conflicts" with linespoints,\
     "xbar_latency.out" title "XBAR Latency" with linespoints,\
     "xbar_rqst_stall.out" title "XBAR Request Stall" with linespoints,\
     "rd64.out" title "RD64 CMD" with linespoints,\
     "wr64.out" title "WR64 CMD" with linespoints


Add plot for % time spent with GPU

Add plot for % time spent with GPU

set terminal png font 'Arial, 24' size 1600,900 background rgb "#ffffff"

set style line 100 lt -1 lw 2 lc rgb '#000000'

set border 3 front ls 100

set datafile separator ','

set grid back lw 2 x y
set xrange [0:24]
set x2range [0:768]
set yrange [0:210]
set xtics nomirror 4
set x2tics nomirror 128
set ytics nomirror 30

####################################

set output 'laptop_cmp.png'

set key off autotitle columnheader
set title 'Gromacs on a cluster node'
set autoscale x
# disable x2 label and tics, but reserve space to preserve alignment
set x2label ' '
set x2tics 10000,10000
set yrange [0:30]
set ytics 5
set ylabel 'Simulation speed (ns/day)'

set boxwidth 0.5
set style fill solid

barcolor(x) = (x == 0) ? (65536 * 64 + 128) : (256 * 174 + 239)

plot 'gpu_cmp_clean.csv' using 0:14:(barcolor($0)):xtic(18) every ::0::1 with boxes lc rgb variable notitle

####################################

set output 'cpus.png'

set key off autotitle columnheader
set title 'Gromacs on many CPUs'
set xlabel 'Cluster nodes'
set xrange [0:24]
set xtics nomirror 4
set x2label 'Threads'
set x2tics nomirror 128
set ylabel 'Simulation speed (ns/day)'
set ytics nomirror 30
set yrange [0:210]

plot \
	'data_clean.csv' using (($4 == 0 && $5 == 0 && stringcolumn(6) eq 'infiniband') ? $2 : 0/0):20 \
		with points notitle lc rgb '#00aeef' pt 7 ps 3 \
	, 'means_clean.csv' using (($2 == 0 && $3 == 0 && stringcolumn(1) eq 'infiniband') ? $4 : 0/0):15 \
		with lines notitle lc rgb '#00aeef' lw 3 \
	, 'laptop.csv' using 1:3 with points notitle lc rgb '#400080' pt 7 ps 3

####################################

set output 'cpus_timespent.png'

set yrange [0:100]
set ytics 25
set ylabel '% Time spent'
set key inside left center invert opaque

plot \
	'means_clean.csv' using (($2 == 0 && $3 == 0 && stringcolumn(1) eq 'infiniband') ? $4 : 0/0):9 with filledcurves above x1 title 'Decomposition' \
	, '' using (($2 == 0 && $3 == 0 && stringcolumn(1) eq 'infiniband') ? $4 : 0/0):9:($9+$10) with filledcurves title 'Comm.Coord.' \
	, '' using (($2 == 0 && $3 == 0 && stringcolumn(1) eq 'infiniband') ? $4 : 0/0):($9+$10):($9+$10+$11) with filledcurves title 'Calc. Force' \
	, '' using (($2 == 0 && $3 == 0 && stringcolumn(1) eq 'infiniband') ? $4 : 0/0):($9+$10+$11):($9+$10+$11+$12) with filledcurves title 'Comm. Force' \
	, '' using (($2 == 0 && $3 == 0 && stringcolumn(1) eq 'infiniband') ? $4 : 0/0):($9+$10+$11+$12):($9+$10+$11+$12+$14) with filledcurves title 'Constraints'

####################################

set output 'cpus_corehours.png'

set key off autotitle columnheader
set title 'Core hours for 1ns run'
set ylabel 'Core hours'
set autoscale y
set ytics autofreq

plot \
	'data_clean.csv' using (($4 == 0 && $5 == 0 && stringcolumn(6) eq 'infiniband') ? $2 : 0/0):($21 * 10 / 3600) \
		with points notitle lc rgb '#00aeef' pt 7 ps 3 \
	, 'means_clean.csv' using (($2 == 0 && $3 == 0 && stringcolumn(1) eq 'infiniband') ? $4 : 0/0):($16 * 10 / 3600) \
		with lines notitle lc rgb '#00aeef' lw 3 \
	, 'laptop.csv' using 1:($4 * 10 / 3600) with points notitle lc rgb '#400080' pt 7 ps 3

####################################

set output 'cpus_wallclock.png'

set title 'Wallclock time for 1ns run'
set ylabel 'Wallclock time (min)'

plot \
	'data_clean.csv' using (($4 == 0 && $5 == 0 && stringcolumn(6) eq 'infiniband') ? $2 : 0/0):($22 * 10 / 60) \
		with points notitle lc rgb '#00aeef' pt 7 ps 3 \
	, 'means_clean.csv' using (($2 == 0 && $3 == 0 && stringcolumn(1) eq 'infiniband') ? $4 : 0/0):($17 * 10 / 60) \
		with lines notitle lc rgb '#00aeef' lw 3

####################################

set output 'cpus_ethernet.png'

set key on inside right bottom autotitle columnheader box height 0.5
set title 'Influence of network'
set yrange [0:210]
set ytics nomirror 30
set ylabel 'Simulation speed (ns/day)'

plot \
	'data_clean.csv' using (($4 == 0 && $5 == 0 && stringcolumn(6) eq 'infiniband') ? $2 : 0/0):20 \
		with points notitle lc rgb '#00aeef' pt 7 ps 3 \
	, 'means_clean.csv' using (($2 == 0 && $3 == 0 && stringcolumn(1) eq 'infiniband') ? $4 : 0/0):15 \
		with lines title 'Infiniband' lc rgb '#00aeef' lw 3 \
	, 'data_clean.csv' using (($4 == 0 && $5 == 0 && stringcolumn(6) eq 'ethernet') ? $2 : 0/0):20 \
		with points notitle lc rgb '#ef6e00' pt 7 ps 3 \
	, 'means_clean.csv' using (($2 == 0 && $3 == 0 && stringcolumn(1) eq 'ethernet') ? $4 : 0/0):15 \
		with lines title 'Ethernet' lc rgb '#ef6e00' lw 3 \
	, 'laptop.csv' using 1:($4 * 100 / 3600) with points notitle lc rgb '#400080' pt 7 ps 3

####################################

set output 'gpu_cmp.png'

set key off autotitle columnheader
set title 'Gromacs on many GPUs'
set autoscale x
# disable x2 label and tics, but reserve space to preserve alignment
set x2label ' '
set x2tics 10000,10000

set boxwidth 0.5
set style fill solid

plot 'gpu_cmp_clean.csv' using 0:14:(barcolor($0)):xtic(18) with boxes lc rgb variable notitle

set xtics nomirror 128

####################################

set output 'cpus_gpu.png'

set key off autotitle columnheader
set title 'Gromacs on many CPUs, with 1 GPU per node'
set xrange [0:24]
set xtics nomirror 4
set x2label 'Threads'
set x2tics nomirror 128

plot \
	'data_clean.csv' using (($4 == 0 && $5 == 0 && stringcolumn(6) eq 'infiniband') ? $2 : 0/0):20 \
		with points notitle lc rgb '#00aeef' pt 7 ps 3 \
	, 'means_clean.csv' using (($2 == 0 && $3 == 0 && stringcolumn(1) eq 'infiniband') ? $4 : 0/0):15 \
		with lines notitle lc rgb '#00aeef' lw 3 \
	, 'data_clean.csv' using (($4 == 1 && $5 == 0 && stringcolumn(6) eq 'infiniband') ? $2 : 0/0):20 \
		with points notitle lc rgb '#009f00' pt 7 ps 3 \
	, 'means_clean.csv' using (($2 == 1 && $3 == 0 && stringcolumn(1) eq 'infiniband') ? $4 : 0/0):15 \
		with lines notitle lc rgb '#009f00' lw 3 \
	, 'laptop.csv' using 1:($4 * 100 / 3600) with points notitle lc rgb '#400080' pt 7 ps 3

####################################

set output 'gpus_timespent.png'

set yrange [0:100]
set xrange [0:12]
set xtics nomirror 2
set x2label 'Threads'
set x2range [0:384]
set x2tics nomirror 64
set ytics 25
set ylabel '% Time spent'
set key inside right top invert opaque

plot \
	'means_clean.csv' using (($2 == 1 && $3 == 0 && stringcolumn(1) eq 'infiniband') ? $4 : 0/0):9 with filledcurves above x1 title 'Decomposition' \
	, '' using (($2 == 1 && $3 == 0 && stringcolumn(1) eq 'infiniband') ? $4 : 0/0):9:($9+$10) with filledcurves title 'Comm.Coord.' \
	, '' using (($2 == 1 && $3 == 0 && stringcolumn(1) eq 'infiniband') ? $4 : 0/0):($9+$10):($9+$10+$11) with filledcurves title 'Calc. Force' \
	, '' using (($2 == 1 && $3 == 0 && stringcolumn(1) eq 'infiniband') ? $4 : 0/0):($9+$10+$11):($9+$10+$11+$12) with filledcurves title 'Comm. Force' \
	, '' using (($2 == 1 && $3 == 0 && stringcolumn(1) eq 'infiniband') ? $4 : 0/0):($9+$10+$11+$12):($9+$10+$11+$12+$13) with filledcurves title 'GPU Wait' \
	, '' using (($2 == 1 && $3 == 0 && stringcolumn(1) eq 'infiniband') ? $4 : 0/0):($9+$10+$11+$12+$13):($9+$10+$11+$12+$14) with filledcurves title 'Constraints'

####################################

set output 'practice.png'

set key on inside right bottom autotitle columnheader box height 0.5
set title 'Gromacs on Cartesius vs. Lisa (approximately)'
set yrange [0:210]
set ytics nomirror 30
set ylabel 'Simulation speed (ns/day)'

plot \
	'data_clean.csv' using (($4 == 0 && $5 == 0 && stringcolumn(6) eq 'infiniband') ? $2 : 0/0):20 \
		with points notitle lc rgb '#00aeef' pt 7 ps 3 \
	, 'means_clean.csv' using (($2 == 0 && $3 == 0 && stringcolumn(1) eq 'infiniband') ? $4 : 0/0):15 \
		with lines title 'Cartesius CPU' lc rgb '#00aeef' lw 3 \
	, 'data_clean.csv' using (($4 == 0 && $5 == 0 && stringcolumn(6) eq 'ethernet') ? $2 : 0/0):20 \
		with points notitle lc rgb '#ef6e00' pt 7 ps 3 \
	, 'means_clean.csv' using (($2 == 0 && $3 == 0 && stringcolumn(1) eq 'ethernet') ? $4 : 0/0):15 \
		with lines title 'Lisa CPU' lc rgb '#ef6e00' lw 3 \
	, 'data_clean.csv' using (($4 == 0 && $5 == 2 && stringcolumn(6) eq 'infiniband') ? $2 : 0/0):20 \
		with points notitle lc rgb '#ae00ef' pt 7 ps 3 \
	, 'means_clean.csv' using (($2 == 0 && $3 == 2 && stringcolumn(1) eq 'infiniband') ? $4 : 0/0):15 \
		with lines title 'Cartesius GPU' lc rgb '#ae00ef' lw 3 \
	, 'laptop.csv' using 1:($4 * 100 / 3600) with points notitle lc rgb '#400080' pt 7 ps 3

set terminal png font 'Arial, 24' size 1600,900 background rgb "#ffffff"

set style line 100 lt -1 lw 2 lc rgb '#000000'

set border 3 front ls 100

set datafile separator ','

set grid back lw 2 x y
set xrange [0:24]
set x2range [0:768]
set yrange [0:210]
set xtics nomirror 4
set x2tics nomirror 128
set ytics nomirror 30

####################################

set output 'laptop_cmp.png'

set key off autotitle columnheader
set title 'Gromacs on a cluster node'
set autoscale x
# disable x2 label and tics, but reserve space to preserve alignment
set x2label ' '
set x2tics 10000,10000
set yrange [0:30]
set ytics 5
set ylabel 'Simulation speed (ns/day)'

set boxwidth 0.5
set style fill solid

barcolor(x) = (x == 0) ? (65536 * 64 + 128) : (256 * 174 + 239)

plot 'gpu_cmp_clean.csv' using 0:14:(barcolor($0)):xtic(18) every ::0::1 with boxes lc rgb variable notitle

####################################

set output 'cpus.png'

set key off autotitle columnheader
set title 'Gromacs on many CPUs'
set xlabel 'Cluster nodes'
set xrange [0:24]
set xtics nomirror 4
set x2label 'Threads'
set x2tics nomirror 128
set ylabel 'Simulation speed (ns/day)'
set ytics nomirror 30
set yrange [0:210]

plot \
	'data_clean.csv' using (($4 == 0 && $5 == 0 && stringcolumn(6) eq 'infiniband') ? $2 : 0/0):20 \
		with points notitle lc rgb '#00aeef' pt 7 ps 3 \
	, 'means_clean.csv' using (($2 == 0 && $3 == 0 && stringcolumn(1) eq 'infiniband') ? $4 : 0/0):15 \
		with lines notitle lc rgb '#00aeef' lw 3 \
	, 'laptop.csv' using 1:3 with points notitle lc rgb '#400080' pt 7 ps 3

####################################

set output 'cpus_timespent.png'

set yrange [0:100]
set ytics 25
set ylabel '% Time spent'
set key inside left center invert opaque

plot \
	'means_clean.csv' using (($2 == 0 && $3 == 0 && stringcolumn(1) eq 'infiniband') ? $4 : 0/0):9 with filledcurves above x1 title 'Decomposition' \
	, '' using (($2 == 0 && $3 == 0 && stringcolumn(1) eq 'infiniband') ? $4 : 0/0):9:($9+$10) with filledcurves title 'Comm.Coord.' \
	, '' using (($2 == 0 && $3 == 0 && stringcolumn(1) eq 'infiniband') ? $4 : 0/0):($9+$10):($9+$10+$11) with filledcurves title 'Calc. Force' \
	, '' using (($2 == 0 && $3 == 0 && stringcolumn(1) eq 'infiniband') ? $4 : 0/0):($9+$10+$11):($9+$10+$11+$12) with filledcurves title 'Comm. Force' \
	, '' using (($2 == 0 && $3 == 0 && stringcolumn(1) eq 'infiniband') ? $4 : 0/0):($9+$10+$11+$12):($9+$10+$11+$12+$14) with filledcurves title 'Constraints'

####################################

set output 'cpus_corehours.png'

set key off autotitle columnheader
set title 'Core hours for 1ns run'
set ylabel 'Core hours'
set autoscale y
set ytics autofreq

plot \
	'data_clean.csv' using (($4 == 0 && $5 == 0 && stringcolumn(6) eq 'infiniband') ? $2 : 0/0):($21 * 10 / 3600) \
		with points notitle lc rgb '#00aeef' pt 7 ps 3 \
	, 'means_clean.csv' using (($2 == 0 && $3 == 0 && stringcolumn(1) eq 'infiniband') ? $4 : 0/0):($16 * 10 / 3600) \
		with lines notitle lc rgb '#00aeef' lw 3 \
	, 'laptop.csv' using 1:($4 * 10 / 3600) with points notitle lc rgb '#400080' pt 7 ps 3

####################################

set output 'cpus_wallclock.png'

set title 'Wallclock time for 1ns run'
set ylabel 'Wallclock time (min)'

plot \
	'data_clean.csv' using (($4 == 0 && $5 == 0 && stringcolumn(6) eq 'infiniband') ? $2 : 0/0):($22 * 10 / 60) \
		with points notitle lc rgb '#00aeef' pt 7 ps 3 \
	, 'means_clean.csv' using (($2 == 0 && $3 == 0 && stringcolumn(1) eq 'infiniband') ? $4 : 0/0):($17 * 10 / 60) \
		with lines notitle lc rgb '#00aeef' lw 3

####################################

set output 'cpus_ethernet.png'

set key on inside right bottom autotitle columnheader box height 0.5
set title 'Influence of network'
set yrange [0:210]
set ytics nomirror 30
set ylabel 'Simulation speed (ns/day)'

plot \
	'data_clean.csv' using (($4 == 0 && $5 == 0 && stringcolumn(6) eq 'infiniband') ? $2 : 0/0):20 \
		with points notitle lc rgb '#00aeef' pt 7 ps 3 \
	, 'means_clean.csv' using (($2 == 0 && $3 == 0 && stringcolumn(1) eq 'infiniband') ? $4 : 0/0):15 \
		with lines title 'Infiniband' lc rgb '#00aeef' lw 3 \
	, 'data_clean.csv' using (($4 == 0 && $5 == 0 && stringcolumn(6) eq 'ethernet') ? $2 : 0/0):20 \
		with points notitle lc rgb '#ef6e00' pt 7 ps 3 \
	, 'means_clean.csv' using (($2 == 0 && $3 == 0 && stringcolumn(1) eq 'ethernet') ? $4 : 0/0):15 \
		with lines title 'Ethernet' lc rgb '#ef6e00' lw 3 \
	, 'laptop.csv' using 1:($4 * 100 / 3600) with points notitle lc rgb '#400080' pt 7 ps 3

####################################

set output 'gpu_cmp.png'

set key off autotitle columnheader
set title 'Gromacs on many GPUs'
set autoscale x
# disable x2 label and tics, but reserve space to preserve alignment
set x2label ' '
set x2tics 10000,10000

set boxwidth 0.5
set style fill solid

plot 'gpu_cmp_clean.csv' using 0:14:(barcolor($0)):xtic(18) with boxes lc rgb variable notitle

set xtics nomirror 128

####################################

set output 'cpus_gpu.png'

set key off autotitle columnheader
set title 'Gromacs on many CPUs, with 1 GPU per node'
set xrange [0:24]
set xtics nomirror 4
set x2label 'Threads'
set x2tics nomirror 128

plot \
	'data_clean.csv' using (($4 == 0 && $5 == 0 && stringcolumn(6) eq 'infiniband') ? $2 : 0/0):20 \
		with points notitle lc rgb '#00aeef' pt 7 ps 3 \
	, 'means_clean.csv' using (($2 == 0 && $3 == 0 && stringcolumn(1) eq 'infiniband') ? $4 : 0/0):15 \
		with lines notitle lc rgb '#00aeef' lw 3 \
	, 'data_clean.csv' using (($4 == 1 && $5 == 0 && stringcolumn(6) eq 'infiniband') ? $2 : 0/0):20 \
		with points notitle lc rgb '#009f00' pt 7 ps 3 \
	, 'means_clean.csv' using (($2 == 1 && $3 == 0 && stringcolumn(1) eq 'infiniband') ? $4 : 0/0):15 \
		with lines notitle lc rgb '#009f00' lw 3 \
	, 'laptop.csv' using 1:($4 * 100 / 3600) with points notitle lc rgb '#400080' pt 7 ps 3

####################################

set output 'practice.png'

set key on inside right bottom autotitle columnheader box height 0.5
set title 'Gromacs on Cartesius vs. Lisa (approximately)'

plot \
	'data_clean.csv' using (($4 == 0 && $5 == 0 && stringcolumn(6) eq 'infiniband') ? $2 : 0/0):20 \
		with points notitle lc rgb '#00aeef' pt 7 ps 3 \
	, 'means_clean.csv' using (($2 == 0 && $3 == 0 && stringcolumn(1) eq 'infiniband') ? $4 : 0/0):15 \
		with lines title 'Cartesius CPU' lc rgb '#00aeef' lw 3 \
	, 'data_clean.csv' using (($4 == 0 && $5 == 0 && stringcolumn(6) eq 'ethernet') ? $2 : 0/0):20 \
		with points notitle lc rgb '#ef6e00' pt 7 ps 3 \
	, 'means_clean.csv' using (($2 == 0 && $3 == 0 && stringcolumn(1) eq 'ethernet') ? $4 : 0/0):15 \
		with lines title 'Lisa CPU' lc rgb '#ef6e00' lw 3 \
	, 'data_clean.csv' using (($4 == 0 && $5 == 2 && stringcolumn(6) eq 'infiniband') ? $2 : 0/0):20 \
		with points notitle lc rgb '#ae00ef' pt 7 ps 3 \
	, 'means_clean.csv' using (($2 == 0 && $3 == 2 && stringcolumn(1) eq 'infiniband') ? $4 : 0/0):15 \
		with lines title 'Cartesius GPU' lc rgb '#ae00ef' lw 3 \
	, 'laptop.csv' using 1:($4 * 100 / 3600) with points notitle lc rgb '#400080' pt 7 ps 3


Setup gnuplot to track distance and angle only

Former-commit-id: 5f3c36043f7c3f74ffb7c75bf3b76333f76a9f9f

if (!exists("FILENAME")) FILENAME='logs/gnuplot.log'

# Uses line number (uses DATA_NUM last lines in the data file (FILENAME)) as x axis
# and all of the actual sensor values as the y axis.
# plot for [i=1:PORT_NUM] '< tail -n '.DATA_NUM.' '.FILENAME using (column(i)) title 'Sensor '.i

if (DIR != '') {
    system ("rm -rf images/gnuplot/".DIR)
    system ("mkdir images/gnuplot/".DIR)
}

time_tick = 0
while (1) {
    set xrange [0:DATA_NUM + 1]
    # Set the size ratio to be the same in all directions
    set size square
    # set style data linespoints
    set style line 1 lc rgb 'black' pt 3

    # Automatically update the last data point and replot
    if (DIR != '') {
        set term png size 1500,1500
        set grid
        set output sprintf('images/gnuplot/%s/vision_data%05.0f.png', DIR, time_tick)
        time_tick = time_tick + 1;
    }
    set title 'Angular Displacement'
    set xlabel 'Time Tick'
    set ylabel 'Angle (deg)'
    set yrange [-80:80]
    plot '< tail -n'.DATA_NUM.' '.FILENAME using 0:2 title 'Phi' with linespoints pt 7, \
         '' using 0:2:(sprintf("%.2f",$2)) with labels nopoint offset char 0,1 font '6' notitle, \
    # plot '< tail -n'.DATA_NUM.' '.FILENAME using 0:3 title 'Phi' with linespoints pt 7, \
    #      '' using 0:3:(sprintf("%.2f",$3)) with labels nopoint offset char 0,1 font '6' notitle, \
         # '< tail -n'.DATA_NUM.' '.FILENAME using 0:4 title 'Beta' with linespoints pt 7, \
         # '' using 0:4:(sprintf("%.2f",$4)) with labels nopoint offset char 0,1 font '6' notitle, \
         '< tail -n'.DATA_NUM.' '.FILENAME using 0:5 title 'Theta' with linespoints pt 7, \
         '' using 0:5:(sprintf("%.2f",$5)) with labels nopoint offset char 0,1 font '6' notitle

    set term wxt 0 persist size 1500,1500
    set output
    replot
}

if (!exists("FILENAME")) FILENAME='logs/gnuplot.log'

# Uses line number (uses DATA_NUM last lines in the data file (FILENAME)) as x axis
# and all of the actual sensor values as the y axis.
# plot for [i=1:PORT_NUM] '< tail -n '.DATA_NUM.' '.FILENAME using (column(i)) title 'Sensor '.i

if (DIR != '') {
    system ("rm -rf images/gnuplot/".DIR)
    system ("mkdir images/gnuplot/".DIR)
}

time_tick = 0
while (1) {
    set xrange [0:DATA_NUM + 1]
    # Set the size ratio to be the same in all directions
    set size square
    # set style data linespoints
    set style line 1 lc rgb 'black' pt 3

    # Automatically update the last data point and replot
    if (DIR != '') {
        set term png size 1500,1500
        set grid
        set output sprintf('images/gnuplot/%s/vision_data%05.0f.png', DIR, time_tick)
        time_tick = time_tick + 1;
    }
    set title 'Angular Displacement'
    set xlabel 'Time Tick'
    set ylabel 'Angle (deg)'
    set yrange [-80:80]
    plot '< tail -n'.DATA_NUM.' '.FILENAME using 0:3 title 'Phi' with linespoints pt 7, \
         '' using 0:3:(sprintf("%.2f",$3)) with labels nopoint offset char 0,1 font '6' notitle, \
         '< tail -n'.DATA_NUM.' '.FILENAME using 0:4 title 'Beta' with linespoints pt 7, \
         '' using 0:4:(sprintf("%.2f",$4)) with labels nopoint offset char 0,1 font '6' notitle, \
         '< tail -n'.DATA_NUM.' '.FILENAME using 0:5 title 'Theta' with linespoints pt 7, \
         '' using 0:5:(sprintf("%.2f",$5)) with labels nopoint offset char 0,1 font '6' notitle

    set term wxt 0 persist size 1500,1500
    set output
    replot
}


Change the "rotate by 90" xtics specification to just "rotate" which is
equivalent. The "by <angle>" syntax is not acceptable for all output
devices. Apparently the Sparc and x86 output devices (no color) don't
accept this, but should accept the plain "rotate".

git-svn-id: a4a6f32337ebd29ad4763b423022f00f68d1c7b7@14645 91177308-0d34-0410-b5e6-96231b3b80d8

set terminal png

##------- Plot small Date vs LOC ----
set output "running_loc.png"
set xlabel "Date"
set ylabel "Lines of Code"
set xdata time
set timefmt "%Y-%m-%d:"
set format x "%b %d, %Y"

## Various labels for the graph
set label "Reoptimizer\n checkins" at "2003-02-18:", 114000
set label "Modulo Sched\n   checkin" at "2003-03-28:", 119500
set label "Reoptimizer\n checkins" at "2003-06-01:", 134000
set label "'dummy'\nfunction" at "2003-07-20:", 150000
set label "Reoptimizer\n removal" at "2003-08-10:", 132000
set label "llvm-db\ncheckin" at "2004-01-04:", 145000
set label "llvm/projects" at "2004-01-04:", 151000

set size .75,.75
set xtics rotate
set xlabel 0,-1
plot "running_loc.txt" using 1:2 title '' with lines, \
     "running_loc.txt" using 1:2 title "Date vs. Lines of Code" with lines

##------- Plot large Date vs LOC ----
set size 1.5,1.5
set xtics norotate
set xlabel 0,0
set output "running_loc_large.png"
plot "running_loc.txt" using 1:2 title '', \
     "running_loc.txt" using 1:2 title "Date vs. Lines of Code" with lines

# Delete all labels...
set nolabel

##------- Olden CBE performance ----

set size .75,.75
set xtics rotate
set xlabel 0,-1
set output "running_Olden_cbe_time.png"
set ylabel "CBE compiled execution time (s)"
plot "running_Olden_cbe_time.txt" u 1:2 t '' with lines, \
     "running_Olden_cbe_time.txt" u 1:2 t "bh" with lines, \
     "running_Olden_cbe_time.txt" u 1:3 t "bisort" with lines, \
     "running_Olden_cbe_time.txt" u 1:4 t "em3d" with lines, \
     "running_Olden_cbe_time.txt" u 1:5 t "health" with lines, \
     "running_Olden_cbe_time.txt" u 1:6 t "mst" with lines, \
     "running_Olden_cbe_time.txt" u 1:7 t "perimeter" with lines, \
     "running_Olden_cbe_time.txt" u 1:8 t "power" with lines, \
     "running_Olden_cbe_time.txt" u 1:9 t "treeadd" with lines, \
     "running_Olden_cbe_time.txt" u 1:10 t "tsp" with lines, \
     "running_Olden_cbe_time.txt" u 1:11 t "voronoi" \
   with lines

set size 1.5,1.5
set xtics norotate
set xlabel 0,0
set output "running_Olden_cbe_time_large.png"
plot "running_Olden_cbe_time.txt" u 1:2 t '' with lines, \
     "running_Olden_cbe_time.txt" u 1:2 t "bh" with lines, \
     "running_Olden_cbe_time.txt" u 1:3 t "bisort" with lines, \
     "running_Olden_cbe_time.txt" u 1:4 t "em3d" with lines, \
     "running_Olden_cbe_time.txt" u 1:5 t "health" with lines, \
     "running_Olden_cbe_time.txt" u 1:6 t "mst" with lines, \
     "running_Olden_cbe_time.txt" u 1:7 t "perimeter" with lines, \
     "running_Olden_cbe_time.txt" u 1:8 t "power" with lines, \
     "running_Olden_cbe_time.txt" u 1:9 t "treeadd" with lines, \
     "running_Olden_cbe_time.txt" u 1:10 t "tsp" with lines, \
     "running_Olden_cbe_time.txt" u 1:11 t "voronoi" \
   with lines

##------- Olden JIT performance ----

set size .75,.75
set xtics rotate
set xlabel 0,-1
set output "running_Olden_jit_time.png"
set ylabel "JIT execution time (s)"
plot "running_Olden_jit_time.txt" u 1:2 t '' with lines, \
     "running_Olden_jit_time.txt" u 1:2 t "bh" with lines, \
     "running_Olden_jit_time.txt" u 1:3 t "bisort" with lines, \
     "running_Olden_jit_time.txt" u 1:4 t "em3d" with lines, \
     "running_Olden_jit_time.txt" u 1:5 t "health" with lines, \
     "running_Olden_jit_time.txt" u 1:6 t "mst" with lines, \
     "running_Olden_jit_time.txt" u 1:7 t "perimeter" with lines, \
     "running_Olden_jit_time.txt" u 1:8 t "power" with lines, \
     "running_Olden_jit_time.txt" u 1:9 t "treeadd" with lines, \
     "running_Olden_jit_time.txt" u 1:10 t "tsp" with lines, \
     "running_Olden_jit_time.txt" u 1:11 t "voronoi" \
   with lines

set size 1.5,1.5
set xtics norotate
set xlabel 0,0
set output "running_Olden_jit_time_large.png"
plot "running_Olden_jit_time.txt" u 1:2 t '' with lines, \
     "running_Olden_jit_time.txt" u 1:2 t "bh" with lines, \
     "running_Olden_jit_time.txt" u 1:3 t "bisort" with lines, \
     "running_Olden_jit_time.txt" u 1:4 t "em3d" with lines, \
     "running_Olden_jit_time.txt" u 1:5 t "health" with lines, \
     "running_Olden_jit_time.txt" u 1:6 t "mst" with lines, \
     "running_Olden_jit_time.txt" u 1:7 t "perimeter" with lines, \
     "running_Olden_jit_time.txt" u 1:8 t "power" with lines, \
     "running_Olden_jit_time.txt" u 1:9 t "treeadd" with lines, \
     "running_Olden_jit_time.txt" u 1:10 t "tsp" with lines, \
     "running_Olden_jit_time.txt" u 1:11 t "voronoi" \
   with lines

##------- Olden LLC performance ----

set size .75,.75
set xtics rotate
set xlabel 0,-1
set output "running_Olden_llc_time.png"
set ylabel "LLC compiled execution time (s)"
plot "running_Olden_llc_time.txt" u 1:2 t '' with lines, \
     "running_Olden_llc_time.txt" u 1:2 t "bh" with lines, \
     "running_Olden_llc_time.txt" u 1:3 t "bisort" with lines, \
     "running_Olden_llc_time.txt" u 1:4 t "em3d" with lines, \
     "running_Olden_llc_time.txt" u 1:5 t "health" with lines, \
     "running_Olden_llc_time.txt" u 1:6 t "mst" with lines, \
     "running_Olden_llc_time.txt" u 1:7 t "perimeter" with lines, \
     "running_Olden_llc_time.txt" u 1:8 t "power" with lines, \
     "running_Olden_llc_time.txt" u 1:9 t "treeadd" with lines, \
     "running_Olden_llc_time.txt" u 1:10 t "tsp" with lines, \
     "running_Olden_llc_time.txt" u 1:11 t "voronoi" \
   with lines

set size 1.5,1.5
set xtics norotate
set xlabel 0,0
set output "running_Olden_llc_time_large.png"
plot "running_Olden_llc_time.txt" u 1:2 t '' with lines, \
     "running_Olden_llc_time.txt" u 1:2 t "bh" with lines, \
     "running_Olden_llc_time.txt" u 1:3 t "bisort" with lines, \
     "running_Olden_llc_time.txt" u 1:4 t "em3d" with lines, \
     "running_Olden_llc_time.txt" u 1:5 t "health" with lines, \
     "running_Olden_llc_time.txt" u 1:6 t "mst" with lines, \
     "running_Olden_llc_time.txt" u 1:7 t "perimeter" with lines, \
     "running_Olden_llc_time.txt" u 1:8 t "power" with lines, \
     "running_Olden_llc_time.txt" u 1:9 t "treeadd" with lines, \
     "running_Olden_llc_time.txt" u 1:10 t "tsp" with lines, \
     "running_Olden_llc_time.txt" u 1:11 t "voronoi" \
   with lines

##------- Olden optimizer time ----

set size .75,.75
set xtics rotate
set xlabel 0,-1
set output "running_Olden_opt_time.png"
set ylabel "Time to run the optimizer (s)"
plot "running_Olden_opt_time.txt" u 1:2 t '' with lines, \
     "running_Olden_opt_time.txt" u 1:2 t "bh" with lines, \
     "running_Olden_opt_time.txt" u 1:3 t "bisort" with lines, \
     "running_Olden_opt_time.txt" u 1:4 t "em3d" with lines, \
     "running_Olden_opt_time.txt" u 1:5 t "health" with lines, \
     "running_Olden_opt_time.txt" u 1:6 t "mst" with lines, \
     "running_Olden_opt_time.txt" u 1:7 t "perimeter" with lines, \
     "running_Olden_opt_time.txt" u 1:8 t "power" with lines, \
     "running_Olden_opt_time.txt" u 1:9 t "treeadd" with lines, \
     "running_Olden_opt_time.txt" u 1:10 t "tsp" with lines, \
     "running_Olden_opt_time.txt" u 1:11 t "voronoi" \
   with lines

set size 1.5,1.5
set xtics norotate
set xlabel 0,0
set output "running_Olden_opt_time_large.png"
plot "running_Olden_opt_time.txt" u 1:2 t '' with lines, \
     "running_Olden_opt_time.txt" u 1:2 t "bh" with lines, \
     "running_Olden_opt_time.txt" u 1:3 t "bisort" with lines, \
     "running_Olden_opt_time.txt" u 1:4 t "em3d" with lines, \
     "running_Olden_opt_time.txt" u 1:5 t "health" with lines, \
     "running_Olden_opt_time.txt" u 1:6 t "mst" with lines, \
     "running_Olden_opt_time.txt" u 1:7 t "perimeter" with lines, \
     "running_Olden_opt_time.txt" u 1:8 t "power" with lines, \
     "running_Olden_opt_time.txt" u 1:9 t "treeadd" with lines, \
     "running_Olden_opt_time.txt" u 1:10 t "tsp" with lines, \
     "running_Olden_opt_time.txt" u 1:11 t "voronoi" \
   with lines

##------- Machine code size ----

set size .75,.75
set xtics rotate
set xlabel 0,-1
set output "running_Olden_machcode.png"
set ylabel "Program machine code size (bytes)"
plot "running_Olden_machcode.txt" u 1:2 t '' with lines, \
     "running_Olden_machcode.txt" u 1:2 t "bh" with lines, \
     "running_Olden_machcode.txt" u 1:3 t "bisort" with lines, \
     "running_Olden_machcode.txt" u 1:4 t "em3d" with lines, \
     "running_Olden_machcode.txt" u 1:5 t "health" with lines, \
     "running_Olden_machcode.txt" u 1:6 t "mst" with lines, \
     "running_Olden_machcode.txt" u 1:7 t "perimeter" with lines, \
     "running_Olden_machcode.txt" u 1:8 t "power" with lines, \
     "running_Olden_machcode.txt" u 1:9 t "treeadd" with lines, \
     "running_Olden_machcode.txt" u 1:10 t "tsp" with lines, \
     "running_Olden_machcode.txt" u 1:11 t "voronoi" \
   with lines

set size 1.5,1.5
set xtics norotate
set xlabel 0,0
set output "running_Olden_machcode_large.png"
plot "running_Olden_machcode.txt" u 1:2 t '' with lines, \
     "running_Olden_machcode.txt" u 1:2 t "bh" with lines, \
     "running_Olden_machcode.txt" u 1:3 t "bisort" with lines, \
     "running_Olden_machcode.txt" u 1:4 t "em3d" with lines, \
     "running_Olden_machcode.txt" u 1:5 t "health" with lines, \
     "running_Olden_machcode.txt" u 1:6 t "mst" with lines, \
     "running_Olden_machcode.txt" u 1:7 t "perimeter" with lines, \
     "running_Olden_machcode.txt" u 1:8 t "power" with lines, \
     "running_Olden_machcode.txt" u 1:9 t "treeadd" with lines, \
     "running_Olden_machcode.txt" u 1:10 t "tsp" with lines, \
     "running_Olden_machcode.txt" u 1:11 t "voronoi" \
   with lines

##------- Bytecode size ----

set size .75,.75
set xtics rotate
set xlabel 0,-1
set output "running_Olden_bytecode.png"
set ylabel "Program bytecode size (bytes)"
plot "running_Olden_bytecode.txt" u 1:2 t '' with lines, \
     "running_Olden_bytecode.txt" u 1:2 t "bh" with lines, \
     "running_Olden_bytecode.txt" u 1:3 t "bisort" with lines, \
     "running_Olden_bytecode.txt" u 1:4 t "em3d" with lines, \
     "running_Olden_bytecode.txt" u 1:5 t "health" with lines, \
     "running_Olden_bytecode.txt" u 1:6 t "mst" with lines, \
     "running_Olden_bytecode.txt" u 1:7 t "perimeter" with lines, \
     "running_Olden_bytecode.txt" u 1:8 t "power" with lines, \
     "running_Olden_bytecode.txt" u 1:9 t "treeadd" with lines, \
     "running_Olden_bytecode.txt" u 1:10 t "tsp" with lines, \
     "running_Olden_bytecode.txt" u 1:11 t "voronoi" \
   with lines

set size 1.5,1.5
set xtics norotate
set xlabel 0,0
set output "running_Olden_bytecode_large.png"
plot "running_Olden_bytecode.txt" u 1:2 t '' with lines, \
     "running_Olden_bytecode.txt" u 1:2 t "bh" with lines, \
     "running_Olden_bytecode.txt" u 1:3 t "bisort" with lines, \
     "running_Olden_bytecode.txt" u 1:4 t "em3d" with lines, \
     "running_Olden_bytecode.txt" u 1:5 t "health" with lines, \
     "running_Olden_bytecode.txt" u 1:6 t "mst" with lines, \
     "running_Olden_bytecode.txt" u 1:7 t "perimeter" with lines, \
     "running_Olden_bytecode.txt" u 1:8 t "power" with lines, \
     "running_Olden_bytecode.txt" u 1:9 t "treeadd" with lines, \
     "running_Olden_bytecode.txt" u 1:10 t "tsp" with lines, \
     "running_Olden_bytecode.txt" u 1:11 t "voronoi" \
   with lines

set terminal png

##------- Plot small Date vs LOC ----
set output "running_loc.png"
set xlabel "Date"
set ylabel "Lines of Code"
set xdata time
set timefmt "%Y-%m-%d:"
set format x "%b %d, %Y"

## Various labels for the graph
set label "Reoptimizer\n checkins" at "2003-02-18:", 114000
set label "Modulo Sched\n   checkin" at "2003-03-28:", 119500
set label "Reoptimizer\n checkins" at "2003-06-01:", 134000
set label "'dummy'\nfunction" at "2003-07-20:", 150000
set label "Reoptimizer\n removal" at "2003-08-10:", 132000
set label "llvm-db\ncheckin" at "2004-01-04:", 145000
set label "llvm/projects" at "2004-01-04:", 151000

set size .75,.75
set xtics rotate by 90
set xlabel 0,-1
plot "running_loc.txt" using 1:2 title '' with lines, \
     "running_loc.txt" using 1:2 title "Date vs. Lines of Code" with lines

##------- Plot large Date vs LOC ----
set size 1.5,1.5
set xtics norotate
set xlabel 0,0
set output "running_loc_large.png"
plot "running_loc.txt" using 1:2 title '', \
     "running_loc.txt" using 1:2 title "Date vs. Lines of Code" with lines

# Delete all labels...
set nolabel

##------- Olden CBE performance ----

set size .75,.75
set xtics rotate by 90
set xlabel 0,-1
set output "running_Olden_cbe_time.png"
set ylabel "CBE compiled execution time (s)"
plot "running_Olden_cbe_time.txt" u 1:2 t '' with lines, \
     "running_Olden_cbe_time.txt" u 1:2 t "bh" with lines, \
     "running_Olden_cbe_time.txt" u 1:3 t "bisort" with lines, \
     "running_Olden_cbe_time.txt" u 1:4 t "em3d" with lines, \
     "running_Olden_cbe_time.txt" u 1:5 t "health" with lines, \
     "running_Olden_cbe_time.txt" u 1:6 t "mst" with lines, \
     "running_Olden_cbe_time.txt" u 1:7 t "perimeter" with lines, \
     "running_Olden_cbe_time.txt" u 1:8 t "power" with lines, \
     "running_Olden_cbe_time.txt" u 1:9 t "treeadd" with lines, \
     "running_Olden_cbe_time.txt" u 1:10 t "tsp" with lines, \
     "running_Olden_cbe_time.txt" u 1:11 t "voronoi" \
   with lines

set size 1.5,1.5
set xtics norotate
set xlabel 0,0
set output "running_Olden_cbe_time_large.png"
plot "running_Olden_cbe_time.txt" u 1:2 t '' with lines, \
     "running_Olden_cbe_time.txt" u 1:2 t "bh" with lines, \
     "running_Olden_cbe_time.txt" u 1:3 t "bisort" with lines, \
     "running_Olden_cbe_time.txt" u 1:4 t "em3d" with lines, \
     "running_Olden_cbe_time.txt" u 1:5 t "health" with lines, \
     "running_Olden_cbe_time.txt" u 1:6 t "mst" with lines, \
     "running_Olden_cbe_time.txt" u 1:7 t "perimeter" with lines, \
     "running_Olden_cbe_time.txt" u 1:8 t "power" with lines, \
     "running_Olden_cbe_time.txt" u 1:9 t "treeadd" with lines, \
     "running_Olden_cbe_time.txt" u 1:10 t "tsp" with lines, \
     "running_Olden_cbe_time.txt" u 1:11 t "voronoi" \
   with lines

##------- Olden JIT performance ----

set size .75,.75
set xtics rotate by 90
set xlabel 0,-1
set output "running_Olden_jit_time.png"
set ylabel "JIT execution time (s)"
plot "running_Olden_jit_time.txt" u 1:2 t '' with lines, \
     "running_Olden_jit_time.txt" u 1:2 t "bh" with lines, \
     "running_Olden_jit_time.txt" u 1:3 t "bisort" with lines, \
     "running_Olden_jit_time.txt" u 1:4 t "em3d" with lines, \
     "running_Olden_jit_time.txt" u 1:5 t "health" with lines, \
     "running_Olden_jit_time.txt" u 1:6 t "mst" with lines, \
     "running_Olden_jit_time.txt" u 1:7 t "perimeter" with lines, \
     "running_Olden_jit_time.txt" u 1:8 t "power" with lines, \
     "running_Olden_jit_time.txt" u 1:9 t "treeadd" with lines, \
     "running_Olden_jit_time.txt" u 1:10 t "tsp" with lines, \
     "running_Olden_jit_time.txt" u 1:11 t "voronoi" \
   with lines

set size 1.5,1.5
set xtics norotate
set xlabel 0,0
set output "running_Olden_jit_time_large.png"
plot "running_Olden_jit_time.txt" u 1:2 t '' with lines, \
     "running_Olden_jit_time.txt" u 1:2 t "bh" with lines, \
     "running_Olden_jit_time.txt" u 1:3 t "bisort" with lines, \
     "running_Olden_jit_time.txt" u 1:4 t "em3d" with lines, \
     "running_Olden_jit_time.txt" u 1:5 t "health" with lines, \
     "running_Olden_jit_time.txt" u 1:6 t "mst" with lines, \
     "running_Olden_jit_time.txt" u 1:7 t "perimeter" with lines, \
     "running_Olden_jit_time.txt" u 1:8 t "power" with lines, \
     "running_Olden_jit_time.txt" u 1:9 t "treeadd" with lines, \
     "running_Olden_jit_time.txt" u 1:10 t "tsp" with lines, \
     "running_Olden_jit_time.txt" u 1:11 t "voronoi" \
   with lines

##------- Olden LLC performance ----

set size .75,.75
set xtics rotate by 90
set xlabel 0,-1
set output "running_Olden_llc_time.png"
set ylabel "LLC compiled execution time (s)"
plot "running_Olden_llc_time.txt" u 1:2 t '' with lines, \
     "running_Olden_llc_time.txt" u 1:2 t "bh" with lines, \
     "running_Olden_llc_time.txt" u 1:3 t "bisort" with lines, \
     "running_Olden_llc_time.txt" u 1:4 t "em3d" with lines, \
     "running_Olden_llc_time.txt" u 1:5 t "health" with lines, \
     "running_Olden_llc_time.txt" u 1:6 t "mst" with lines, \
     "running_Olden_llc_time.txt" u 1:7 t "perimeter" with lines, \
     "running_Olden_llc_time.txt" u 1:8 t "power" with lines, \
     "running_Olden_llc_time.txt" u 1:9 t "treeadd" with lines, \
     "running_Olden_llc_time.txt" u 1:10 t "tsp" with lines, \
     "running_Olden_llc_time.txt" u 1:11 t "voronoi" \
   with lines

set size 1.5,1.5
set xtics norotate
set xlabel 0,0
set output "running_Olden_llc_time_large.png"
plot "running_Olden_llc_time.txt" u 1:2 t '' with lines, \
     "running_Olden_llc_time.txt" u 1:2 t "bh" with lines, \
     "running_Olden_llc_time.txt" u 1:3 t "bisort" with lines, \
     "running_Olden_llc_time.txt" u 1:4 t "em3d" with lines, \
     "running_Olden_llc_time.txt" u 1:5 t "health" with lines, \
     "running_Olden_llc_time.txt" u 1:6 t "mst" with lines, \
     "running_Olden_llc_time.txt" u 1:7 t "perimeter" with lines, \
     "running_Olden_llc_time.txt" u 1:8 t "power" with lines, \
     "running_Olden_llc_time.txt" u 1:9 t "treeadd" with lines, \
     "running_Olden_llc_time.txt" u 1:10 t "tsp" with lines, \
     "running_Olden_llc_time.txt" u 1:11 t "voronoi" \
   with lines

##------- Olden optimizer time ----

set size .75,.75
set xtics rotate by 90
set xlabel 0,-1
set output "running_Olden_opt_time.png"
set ylabel "Time to run the optimizer (s)"
plot "running_Olden_opt_time.txt" u 1:2 t '' with lines, \
     "running_Olden_opt_time.txt" u 1:2 t "bh" with lines, \
     "running_Olden_opt_time.txt" u 1:3 t "bisort" with lines, \
     "running_Olden_opt_time.txt" u 1:4 t "em3d" with lines, \
     "running_Olden_opt_time.txt" u 1:5 t "health" with lines, \
     "running_Olden_opt_time.txt" u 1:6 t "mst" with lines, \
     "running_Olden_opt_time.txt" u 1:7 t "perimeter" with lines, \
     "running_Olden_opt_time.txt" u 1:8 t "power" with lines, \
     "running_Olden_opt_time.txt" u 1:9 t "treeadd" with lines, \
     "running_Olden_opt_time.txt" u 1:10 t "tsp" with lines, \
     "running_Olden_opt_time.txt" u 1:11 t "voronoi" \
   with lines

set size 1.5,1.5
set xtics norotate
set xlabel 0,0
set output "running_Olden_opt_time_large.png"
plot "running_Olden_opt_time.txt" u 1:2 t '' with lines, \
     "running_Olden_opt_time.txt" u 1:2 t "bh" with lines, \
     "running_Olden_opt_time.txt" u 1:3 t "bisort" with lines, \
     "running_Olden_opt_time.txt" u 1:4 t "em3d" with lines, \
     "running_Olden_opt_time.txt" u 1:5 t "health" with lines, \
     "running_Olden_opt_time.txt" u 1:6 t "mst" with lines, \
     "running_Olden_opt_time.txt" u 1:7 t "perimeter" with lines, \
     "running_Olden_opt_time.txt" u 1:8 t "power" with lines, \
     "running_Olden_opt_time.txt" u 1:9 t "treeadd" with lines, \
     "running_Olden_opt_time.txt" u 1:10 t "tsp" with lines, \
     "running_Olden_opt_time.txt" u 1:11 t "voronoi" \
   with lines

##------- Machine code size ----

set size .75,.75
set xtics rotate by 90
set xlabel 0,-1
set output "running_Olden_machcode.png"
set ylabel "Program machine code size (bytes)"
plot "running_Olden_machcode.txt" u 1:2 t '' with lines, \
     "running_Olden_machcode.txt" u 1:2 t "bh" with lines, \
     "running_Olden_machcode.txt" u 1:3 t "bisort" with lines, \
     "running_Olden_machcode.txt" u 1:4 t "em3d" with lines, \
     "running_Olden_machcode.txt" u 1:5 t "health" with lines, \
     "running_Olden_machcode.txt" u 1:6 t "mst" with lines, \
     "running_Olden_machcode.txt" u 1:7 t "perimeter" with lines, \
     "running_Olden_machcode.txt" u 1:8 t "power" with lines, \
     "running_Olden_machcode.txt" u 1:9 t "treeadd" with lines, \
     "running_Olden_machcode.txt" u 1:10 t "tsp" with lines, \
     "running_Olden_machcode.txt" u 1:11 t "voronoi" \
   with lines

set size 1.5,1.5
set xtics norotate
set xlabel 0,0
set output "running_Olden_machcode_large.png"
plot "running_Olden_machcode.txt" u 1:2 t '' with lines, \
     "running_Olden_machcode.txt" u 1:2 t "bh" with lines, \
     "running_Olden_machcode.txt" u 1:3 t "bisort" with lines, \
     "running_Olden_machcode.txt" u 1:4 t "em3d" with lines, \
     "running_Olden_machcode.txt" u 1:5 t "health" with lines, \
     "running_Olden_machcode.txt" u 1:6 t "mst" with lines, \
     "running_Olden_machcode.txt" u 1:7 t "perimeter" with lines, \
     "running_Olden_machcode.txt" u 1:8 t "power" with lines, \
     "running_Olden_machcode.txt" u 1:9 t "treeadd" with lines, \
     "running_Olden_machcode.txt" u 1:10 t "tsp" with lines, \
     "running_Olden_machcode.txt" u 1:11 t "voronoi" \
   with lines

##------- Bytecode size ----

set size .75,.75
set xtics rotate by 90
set xlabel 0,-1
set output "running_Olden_bytecode.png"
set ylabel "Program bytecode size (bytes)"
plot "running_Olden_bytecode.txt" u 1:2 t '' with lines, \
     "running_Olden_bytecode.txt" u 1:2 t "bh" with lines, \
     "running_Olden_bytecode.txt" u 1:3 t "bisort" with lines, \
     "running_Olden_bytecode.txt" u 1:4 t "em3d" with lines, \
     "running_Olden_bytecode.txt" u 1:5 t "health" with lines, \
     "running_Olden_bytecode.txt" u 1:6 t "mst" with lines, \
     "running_Olden_bytecode.txt" u 1:7 t "perimeter" with lines, \
     "running_Olden_bytecode.txt" u 1:8 t "power" with lines, \
     "running_Olden_bytecode.txt" u 1:9 t "treeadd" with lines, \
     "running_Olden_bytecode.txt" u 1:10 t "tsp" with lines, \
     "running_Olden_bytecode.txt" u 1:11 t "voronoi" \
   with lines

set size 1.5,1.5
set xtics norotate
set xlabel 0,0
set output "running_Olden_bytecode_large.png"
plot "running_Olden_bytecode.txt" u 1:2 t '' with lines, \
     "running_Olden_bytecode.txt" u 1:2 t "bh" with lines, \
     "running_Olden_bytecode.txt" u 1:3 t "bisort" with lines, \
     "running_Olden_bytecode.txt" u 1:4 t "em3d" with lines, \
     "running_Olden_bytecode.txt" u 1:5 t "health" with lines, \
     "running_Olden_bytecode.txt" u 1:6 t "mst" with lines, \
     "running_Olden_bytecode.txt" u 1:7 t "perimeter" with lines, \
     "running_Olden_bytecode.txt" u 1:8 t "power" with lines, \
     "running_Olden_bytecode.txt" u 1:9 t "treeadd" with lines, \
     "running_Olden_bytecode.txt" u 1:10 t "tsp" with lines, \
     "running_Olden_bytecode.txt" u 1:11 t "voronoi" \
   with lines


remove plot

remove plot

set style data lines
set key outside top center
set xlabel 'theta'
set x2label 'exner'
set ylabel 'height'
#set xrange [288:298]
#set x2range [0.90:1]
#set yrange [0:3000]
set x2tics

plot 'build/gravityWaves-btf-1000m/18000/exnerTheta-sampleLine.dat' using 3:1 lc 1 title 'BTF theta', \
 'build/gravityWaves-btf-1000m/18000/exnerTheta-sampleLine.dat' using 2:1 axes x2y1 lc 1 dt 2 title 'BTF exner', \
 'build/gravityWaves-sleve-1000m/18000/exnerTheta-sampleLine.dat' using 3:1 lc 2 title 'SLEVE theta', \
 'build/gravityWaves-sleve-1000m/18000/exnerTheta-sampleLine.dat' using 2:1 axes x2y1 lc 2 dt 2 title 'SLEVE exner', \
 'build/gravityWaves-cutCell-1000m/18000/exnerTheta-sampleLine.dat' using 3:1 lc 3 title 'cut cell theta', \
 'build/gravityWaves-cutCell-1000m/18000/exnerTheta-sampleLine.dat' using 2:1 axes x2y1 lc 3 dt 2 title 'cut cell exner'


max Y scale limited to 3s of data

max Y scale limited to 3s of data

This should prevent outliers from dictating the maximum Y scales

#!/usr/bin/env gnuplot

# graph of network usage

# datafiles
ifnameh = "/tmp/lnxdiagd/mysql/sql13h.csv"
ifnamed = "/tmp/lnxdiagd/mysql/sql13d.csv"
ifnamew = "/tmp/lnxdiagd/mysql/sql13w.csv"
set output "/tmp/lnxdiagd/site/img/day13.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 front
tz_offset = utc_offset / 3600 # GNUplot only works with UTC. Need to compensate
                              # for timezone ourselves.
# Positions of split between graphs
LMARG = 0.06
LMPOS = 0.40
MRPOS = 0.73
RMARG = 0.94

# ************************************************************* Functions ******
# determine delta data
delta(x) = ( xD = x - old_x, old_x = x, xD <= 0 ? 0.1 : xD)
# lg(x)    = ( xL = x, xL == NaN ? NaN : log(xL) )
old_x = NaN

min(x,y) = (x < y) ? x : y
max(x,y) = (x > y) ? x : y

# ********************************************************* 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 of column 7 (Upload bytes per minute)
stats ifnameh using (delta($7)) name "Yh" nooutput
old_x = NaN

# ********************************************************* 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 of column 7 (Upload bytes per minute)
stats ifnamed using (delta($7)) name "Yd" nooutput
old_x = NaN

# ********************************************************* 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 to be calculated here of column 7 (Upload bytes per minute)
stats ifnameh using (delta($7)) name "Yw" nooutput
old_x = NaN

Ymax = max(max(Yd_max, Yh_max), Yw_max) * 8 / 60.
Ymin = 1024 * 8 / 60.
Ystd = max(max(Yd_stddev, Yh_stddev), Yw_stddev)
Ymean = max(max(Yd_mean, Yh_mean), Yw_mean)
Ymax = (Ymean + Ystd) * 3 * 8 /60.

# ********************** Statistics for the bottom graphs **********************
# ********************************************************* Statistics (R) *****
# stats to be calculated here of column 6 (Download bytes per minute)
stats ifnameh using (delta($6)) name "Ybh" nooutput
old_x = NaN

# ********************************************************* Statistics (M) *****
# stats to be calculated here of column 6 (Download bytes per minute)
stats ifnamed using (delta($6)) name "Ybd" nooutput
old_x = NaN

# ********************************************************* Statistics (L) *****
# stats to be calculated here of column 6 (Download bytes per minute)
stats ifnameh using (delta($6)) name "Ybw" nooutput
old_x = NaN

set multiplot layout 2, 3 title "Network load ".strftime("( %Y-%m-%dT%H:%M:%S )", time(0)+utc_offset)

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

# ***************************************************************** X-axis *****
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 ""            # Display time in 24 hour notation on the X axis
set xrange [ Xw_min : Xw_max ]

# ***************************************************************** Y-axis *****
set ylabel "Network load [bits/sec]"
set yrange [ Ymin : Ymax ]
set format y "%3.0s%c"
# set autoscale y
set bmargin 0

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

# ***************************************************************** Output *****

set lmargin at screen LMARG
set rmargin at screen LMPOS

# ***** PLOT *****
plot ifnamew \
      using ($2+utc_offset):(delta($7)*8/60.) title "Upload (eth0)" with lines lc rgb "#cc0000bb" lw 1
old_x = NaN

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

# ***************************************************************** X-axis *****
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 ""            # 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 [ Ymin : Ymax ]

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

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

# ***** PLOT *****
plot ifnamed \
      using ($2+utc_offset):(delta($7)*8/60.) with lines lc rgb "#cc0000bb" lw 1
old_x = NaN

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

# ***************************************************************** X-axis *****
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 ""            # 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 [ Ymin : Ymax ]

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

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

# ***** PLOT *****
plot ifnameh \
      using ($2+utc_offset):(delta($7)*8/60.) with lines lc rgb "#cc0000bb" lw 1
old_x = NaN

################################################################################
################################################################################
################################## BOTTOM PLOT #################################
################################################################################
################################################################################

Ymax = max(max(Ybd_max, Ybh_max), Ybw_max) * 8 / 60.
#Ymin = min(min(Ybd_min, Ybh_min), Ybw_min) -1
Ymin = 1024 * 8 / 60.
Ystd = max(max(Ybd_stddev, Ybh_stddev), Ybw_stddev)
Ymean = max(max(Ybd_mean, Ybh_mean), Ybw_mean)
Ymax = (Ymean + Ystd) * 3 * 8 /60.

# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#                                                    BTM 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 " "
set yrange [ Ymin : Ymax ] reverse
set format y "%3.0s%c"
# set autoscale y
set tmargin 0
unset bmargin

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

# ***************************************************************** Output *****

set lmargin at screen LMARG
set rmargin at screen LMPOS

# ***** PLOT *****
plot ifnamew \
      using ($2+utc_offset):(delta($6)*8/60.) title "Download (eth0)" with lines lc rgb "#ccbb0000" lw 1
old_x = NaN

# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#                                                 BTM 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 [ Ymin : Ymax ] reverse

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

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

# ***** PLOT *****
plot ifnamed \
      using ($2+utc_offset):(delta($6)*8/60.) with lines lc rgb "#ccbb0000" lw 1
old_x = NaN

# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#                                                  BTM 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 ]
set xtics textcolor rgb "red"

# ***************************************************************** Y-axis *****
set ylabel " "
set ytics format " "
set yrange [ Ymin : Ymax ] reverse

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

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

# ***** PLOT *****
plot ifnameh \
      using ($2+utc_offset):(delta($6)*8/60.) with lines lc rgb "#ccbb0000" lw 1

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

unset multiplot

#!/usr/bin/env gnuplot

# graph of network usage

# datafiles
ifnameh = "/tmp/lnxdiagd/mysql/sql13h.csv"
ifnamed = "/tmp/lnxdiagd/mysql/sql13d.csv"
ifnamew = "/tmp/lnxdiagd/mysql/sql13w.csv"
set output "/tmp/lnxdiagd/site/img/day13.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 front
tz_offset = utc_offset / 3600 # GNUplot only works with UTC. Need to compensate
                              # for timezone ourselves.
# Positions of split between graphs
LMARG = 0.06
LMPOS = 0.40
MRPOS = 0.73
RMARG = 0.94

# ************************************************************* Functions ******
# determine delta data
delta(x) = ( xD = x - old_x, old_x = x, xD <= 0 ? 0.1 : xD)
# lg(x)    = ( xL = x, xL == NaN ? NaN : log(xL) )
old_x = NaN

min(x,y) = (x < y) ? x : y
max(x,y) = (x > y) ? x : y

# ********************************************************* 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 of column 7 (Upload bytes per minute)
stats ifnameh using (delta($7)) name "Yh" nooutput
old_x = NaN

# ********************************************************* 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 of column 7 (Upload bytes per minute)
stats ifnamed using (delta($7)) name "Yd" nooutput
old_x = NaN

# ********************************************************* 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 to be calculated here of column 7 (Upload bytes per minute)
stats ifnameh using (delta($7)) name "Yw" nooutput
old_x = NaN

Ymax = max(max(Yd_max, Yh_max), Yw_max) * 8 / 60.
Ymin = 1024 * 8 / 60.

# ********************** Statistics for the bottom graphs **********************
# ********************************************************* Statistics (R) *****
# stats to be calculated here of column 6 (Download bytes per minute)
stats ifnameh using (delta($6)) name "Ybh" nooutput
old_x = NaN

# ********************************************************* Statistics (M) *****
# stats to be calculated here of column 6 (Download bytes per minute)
stats ifnamed using (delta($6)) name "Ybd" nooutput
old_x = NaN

# ********************************************************* Statistics (L) *****
# stats to be calculated here of column 6 (Download bytes per minute)
stats ifnameh using (delta($6)) name "Ybw" nooutput
old_x = NaN

set multiplot layout 2, 3 title "Network load ".strftime("( %Y-%m-%dT%H:%M:%S )", time(0)+utc_offset)

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

# ***************************************************************** X-axis *****
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 ""            # Display time in 24 hour notation on the X axis
set xrange [ Xw_min : Xw_max ]

# ***************************************************************** Y-axis *****
set ylabel "Network load [bits/sec]"
set yrange [ Ymin : Ymax ]
set format y "%3.0s%c"
# set autoscale y
set bmargin 0

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

# ***************************************************************** Output *****

set lmargin at screen LMARG
set rmargin at screen LMPOS

# ***** PLOT *****
plot ifnamew \
      using ($2+utc_offset):(delta($7)*8/60.) title "Upload (eth0)" with lines lc rgb "#cc0000bb" lw 1
old_x = NaN

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

# ***************************************************************** X-axis *****
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 ""            # 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 [ Ymin : Ymax ]

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

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

# ***** PLOT *****
plot ifnamed \
      using ($2+utc_offset):(delta($7)*8/60.) with lines lc rgb "#cc0000bb" lw 1
old_x = NaN

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

# ***************************************************************** X-axis *****
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 ""            # 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 [ Ymin : Ymax ]

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

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

# ***** PLOT *****
plot ifnameh \
      using ($2+utc_offset):(delta($7)*8/60.) with lines lc rgb "#cc0000bb" lw 1
old_x = NaN

################################################################################
################################################################################
################################## BOTTOM PLOT #################################
################################################################################
################################################################################

Ymax = max(max(Ybd_max, Ybh_max), Ybw_max) * 8 / 60.
#Ymin = min(min(Ybd_min, Ybh_min), Ybw_min) -1
Ymin = 1024 * 8 / 60.

# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#                                                    BTM 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 " "
set yrange [ Ymin : Ymax ] reverse
set format y "%3.0s%c"
# set autoscale y
set tmargin 0
unset bmargin

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

# ***************************************************************** Output *****

set lmargin at screen LMARG
set rmargin at screen LMPOS

# ***** PLOT *****
plot ifnamew \
      using ($2+utc_offset):(delta($6)*8/60.) title "Download (eth0)" with lines lc rgb "#ccbb0000" lw 1
old_x = NaN

# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#                                                 BTM 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 [ Ymin : Ymax ] reverse

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

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

# ***** PLOT *****
plot ifnamed \
      using ($2+utc_offset):(delta($6)*8/60.) with lines lc rgb "#ccbb0000" lw 1
old_x = NaN

# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#                                                  BTM 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 ]
set xtics textcolor rgb "red"

# ***************************************************************** Y-axis *****
set ylabel " "
set ytics format " "
set yrange [ Ymin : Ymax ] reverse

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

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

# ***** PLOT *****
plot ifnameh \
      using ($2+utc_offset):(delta($6)*8/60.) with lines lc rgb "#ccbb0000" lw 1

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

unset multiplot


20160416T1230

#!/usr/bin/env gnuplot

# graph of network usage

# datafile
ifname = "/tmp/sql13.csv"
ofname = "/tmp/lnxdiagd/site/img/day13.png"

# ******************************************************* General settings *****
set terminal png truecolor enhanced font "Vera" 10 size 640,304
set datafile separator ';'
set datafile missing "NaN"    # Ignore missing values
set grid front
tz_offset = utc_offset / 3600 # GNUplot only works with UTC. Need to compensate
                              # for timezone ourselves.
set output ofname

# ************************************************************* Functions ******
# determine delta data
delta(x) = ( xD = x - old_x, old_x = x, xD <= 0 ? NaN : xD)
lg(x)    = ( xL = x, xL == NaN ? NaN : log(xL) )
old_x = NaN

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

# stats to be calculated here of column 6 (Download bytes per minute)
stats ifname using (delta($6)) name "Ydn" nooutput
Ydn_min = 1024 * 8 / 60.
Ydn_max = Ydn_max * 8 / 60.

# stats to be calculated here of column 6 (Download bytes per minute)
stats ifname using (delta($7)) name "Yup" nooutput
Yup_min = 1024 * 8 / 60.
Yup_max = Yup_max * 8 / 60.

# ****************************************************************** Title *****

unset key

set multiplot layout 2,1 title "Network Usage (eth0)"

################################################################################
################################### TOP PLOT ###################################
################################################################################

# ***************************************************************** X-axis *****
set xdata time               # Define that data on X-axis should be interpreted as time
set timefmt "%s"             # Time in log-file is given in Unix format
set format x ""
set xtics rotate by 40 right
set xrange [ X_min : X_max ]

# ***************************************************************** Y-axis *****
set ylabel "Speed [bits/sec]"
set format y "%3.0s %c"
set logscale y 10
set yrange [ Yup_min : Yup_max ]
set bmargin 0

# ***************************************************************** Output *****
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 style data boxes
##set style fill solid noborder

plot ifname using ($2+utc_offset):(delta($7)*8/60) title "Upload   (eth0)" fc rgb "#0000bb" with dots\

unset object 1

################################################################################
################################## BOTTOM PLOT #################################
################################################################################

# ******************************************************* General settings *****
set timestamp 'created: %Y-%m-%d %H:%M' bottom

# ***************************************************************** X-axis *****
set xlabel "Date/Time"       # X-axis label
set xdata time               # Define that 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 xtics rotate by 40 right
set xrange [ X_min : X_max ]

# ***************************************************************** Y-axis *****
unset ylabel
set logscale y 10
set yrange [ Ydn_min : Ydn_max ] reverse
set tmargin 0
unset bmargin

# ***************************************************************** Output *****
##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

# ***** PLOT *****
##set style data boxes
##set style fill solid noborder

plot ifname using ($2+utc_offset):(delta($6)*8/60) title "Download (eth0)" fc rgb "#bb0000"  with dots \

unset object 2
unset multiplot

#!/usr/bin/env gnuplot

# graph of network usage

# datafile
ifname = "/tmp/sql13.csv"
ofname = "/tmp/lnxdiagd/site/img/day13.png"

# ******************************************************* General settings *****
set terminal png truecolor enhanced font "Vera" 10 size 640,304
set datafile separator ';'
set datafile missing "NaN"    # Ignore missing values
set grid front
tz_offset = utc_offset / 3600 # GNUplot only works with UTC. Need to compensate
                              # for timezone ourselves.
set output ofname

# ************************************************************* Functions ******
# determine delta data
delta(x) = ( xD = x - old_x, old_x = x, xD <= 0 ? NaN : xD)
lg(x)    = ( xL = x, xL == NaN ? NaN : log(xL) )
old_x = NaN

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

# stats to be calculated here of column 6 (Download bytes per minute)
stats ifname using (delta($6)) name "Ydn" nooutput
Ydn_min = 1 * 8 / 60.
Ydn_max = Ydn_max * 8 / 60.

# stats to be calculated here of column 6 (Download bytes per minute)
stats ifname using (delta($7)) name "Yup" nooutput
Yup_min = 1 * 8 / 60.
Yup_max = Yup_max * 8 / 60.

# ****************************************************************** Title *****

unset key

set multiplot layout 2,1 title "Network Usage (eth0)"

################################################################################
################################### TOP PLOT ###################################
################################################################################

# ***************************************************************** X-axis *****
set xdata time               # Define that data on X-axis should be interpreted as time
set timefmt "%s"             # Time in log-file is given in Unix format
set format x ""
set xtics rotate by 40 right
set xrange [ X_min : X_max ]

# ***************************************************************** Y-axis *****
set ylabel "Speed [bits/sec]"
set format y "%3.0s %c"
set logscale y 2
set yrange [ Yup_min : Yup_max ]
set bmargin 0

# ***************************************************************** 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 style data boxes
##set style fill solid noborder

plot ifname using ($2+utc_offset):(delta($7)*8/60) title "Upload   (eth0)" fc rgb "#0000bb" with dots\

################################################################################
################################## BOTTOM PLOT #################################
################################################################################

# ******************************************************* General settings *****
set timestamp 'created: %Y-%m-%d %H:%M' bottom

# ***************************************************************** X-axis *****
set xlabel "Date/Time"       # X-axis label
set xdata time               # Define that 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 xtics rotate by 40 right
set xrange [ X_min : X_max ]

# ***************************************************************** Y-axis *****
unset ylabel
set logscale y 2
set yrange [ Ydn_min : Ydn_max ] reverse
set tmargin 0
unset bmargin

# ***************************************************************** 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

# ***** PLOT *****
##set style data boxes
##set style fill solid noborder

plot ifname using ($2+utc_offset):(delta($6)*8/60) title "Download (eth0)" fc rgb "#bb0000"  with dots \

unset multiplot


is_classad testing

is_classad testing

:- use_module('../lib/classad.pl').

:- use_module(library(debug)).
:- use_module(library(plunit)).

:- use_module(library(lists)).
:- use_module(library(assoc)).
:- use_module(library(date)).

:- begin_tests(classad).

test('new_classad-1') :-
    new_classad('[classad]'(M)),
    is_assoc(M),
    assoc_to_list(M, []).

test('is_classad-1') :-
    new_classad(CA),
    is_classad(CA).

test('is_classad-2') :-
    \+is_classad(a),
    \+is_classad('[classad]'(foo)).

:- end_tests(classad).

:- use_module('../lib/classad.pl').

:- use_module(library(debug)).
:- use_module(library(plunit)).

:- use_module(library(lists)).
:- use_module(library(assoc)).
:- use_module(library(date)).

:- begin_tests(classad).

test('new_classad 1') :-
    new_classad('[classad]'(M)),
    is_assoc(M),
    assoc_to_list(M, []).

:- end_tests(classad).