# scripts.
# test2 performance comparison for data base with 25,000,000 records.
# size of database = FIXME

#4. Comparison of sum of access time (seconds) for incremental amount of random 
# records. Test2 uses cuantified number keys, test1 does not.
# dbh-dbhQ comparison.
set title "DBH Performance Comparison with Different Symbolic Representations for Integer Keys"; set key left; set xlabel "Records accessed (total records in file, 25M)"; set ylabel "Elapsed wall clock time (seconds)"; plot 'growdata-test1-dbh.dat' using 1:2 title "Conventional integer representation" with lines, 'growdata-test2-dbh.dat' using 1:2 title "Quantified integer representation" with lines;set terminal postscript landscape enhanced color blacktext solid lw 2 "Helvetica" 10;set object 1 rectangle from screen 0,0 to screen 1,1 fillcolor rgb"#eeeeee" behind; set output "comparison-quantum.ps";replot;set terminal x11

#1. Comparison for first 100000 random access. Comparison between gdbm and gnu libdbh, normal keys.
unset label; unset title; set title "Performance Comparison for First 100000 Random Accesses"; set key left; set xlabel "Records accessed (total records in file, 25M)"; set ylabel "Elapsed wall clock time (seconds)";  plot 'growdata-test4-dbf.dat' using 1:2 title "GDBM" with lines, 'growdata-test4-dbh.dat' using 1:2 title "Libdbh" with lines;set terminal postscript landscape enhanced color blacktext solid lw 2 "Helvetica" 10;set object 1 rectangle from screen 0,0 to screen 1,1 fillcolor rgb"#eeeeee" behind;set output "comparison-1e5.ps";replot;set terminal x11


plot 'growdata-test4-dbf.dat' using 1:2 with lines, 'growdata-test4-dbh.dat' using 1:2 with lines

#2. Same as above for first 250000 random accesses XXX
unset label; unset title; set title "Performance Comparison for First 250000 Random Accesses"; set key left; set xlabel "Records accessed (total records in file, 25M)"; set ylabel "Elapsed wall clock time (seconds)";  plot 'growdata-test3-dbf.dat' using 1:2 title "GDBM" with lines, 'growdata-test3-dbh.dat' using 1:2 title "Libdbh" with lines


plot 'growdata-test3-dbf.dat' using 1:2 with lines, 'growdata-test3-dbh.dat' using 1:2 with lines

#3. Same as above for first 5000000 random accessed.
unset label; unset title; set title "Performance Comparison for First 1000000 Random Accesses"; set key left; set xlabel "Records accessed (total records in file, 25M)"; set ylabel "Elapsed wall clock time (seconds)";  plot 'growdata-test1b-dbf.dat' using 1:2 title "GDBM" with lines, 'growdata-test1b-dbh.dat' using 1:2 title "Libdbh" with lines;;set terminal postscript landscape enhanced color blacktext solid lw 2 "Helvetica" 10;set object 1 rectangle from screen 0,0 to screen 1,1 fillcolor rgb"#eeeeee" behind;set output "comparison-1e6.ps";replot;set terminal x11

set terminal postscript landscape enhanced mono dashed lw 3 "Helvetica" 10;set object 1 rectangle from screen 0,0 to screen 1,1 fillcolor rgb"#ffcccc" behind;set output "comparison-1e6.ps";replot;set terminal x11


plot 'growdata-test1-dbf.dat' using 1:2 with lines, 'growdata-test1-dbh.dat' using 1:2 with lines


     set terminal postscript portrait enhanced mono dashed lw 1 "Helvetica" 14 
     set output "my-plot.ps"
     replot
     set terminal x11
     set size 1,1


############################################################################3
# test 1, records=FIXME database size=FIXME
# gdbm/dbh/dbh-Quantakey comparisons:
# random accesses versus walltime/usertime/systime/resident/page faults

