sistema_progs

Programas para customizar o meu entorno de traballo nos meus equipos persoais
Log | Files | Refs

pr227-plot.gp (2832B)


      1 #!/usr/bin/gnuplot
      2 
      3 set terminal pdfcairo size 4.5,4.5/sqrt(2)
      4 set output 'pr227-sleep-delay.pdf'
      5 
      6 set xlabel 'Requested delay (argument of sleep) [sec]'
      7 set ylabel 'Actual delay of sleep [sec]'
      8 
      9 avg_empty = 0.005270
     10 avg_0_001 = 0.0112548
     11 fcost = avg_0_001 - 0.001 - avg_empty
     12 
     13 set title 'Scatter plot of actual delay vs requested (Bash 3.2 / CI macOS)'
     14 set key left top Left
     15 plot [0:0.100]\
     16   'pr227.ci-macos.txt' u 2:($1-avg_empty) lc rgb '#FF0000' title 'Sample points', \
     17   x lc rgb '#000000' title 'y = x', \
     18   x+fcost lc rgb '#888888' dt (8,4) title 'y = x + (fork overhead)'
     19 
     20 plot \
     21   'pr227.ci-macos.txt' u 2:($1-avg_empty) lc rgb '#FF0000' ps 0.5 lw 0.5 title 'Sample points', \
     22   x lc rgb '#000000' title 'y = x', \
     23   x+fcost lc rgb '#888888' dt (8,4) title 'y = x + (fork overhead)'
     24 
     25 set title 'Distribution of delay (requested = 0.001) (Bash 3.2 / CI macOS)'
     26 set xlabel 'Actual delay [sec]'
     27 set ylabel 'Histogram count'
     28 set style fill solid
     29 set boxwidth 0.8 relative
     30 set yrange [0:60]
     31 plot \
     32   'pr227.sleep0001.hist' u 1:2 w boxes fc rgb '#AAAAFF' notitle, \
     33   'pr227.sleep0001.hist' u 1:2:(sqrt($2)) w yerror lc rgb '#000088' notitle
     34 
     35 set title 'Distribution of extra delay (requested >= 0.020) (Bash 3.2 / CI macOS)'
     36 set xlabel 'Extra delay [sec]'
     37 set ylabel 'Histogram count'
     38 set style fill solid
     39 set boxwidth 0.8 relative
     40 set yrange [0:*]
     41 plot \
     42   'pr227.sleep0020p.hist' u 1:2 w boxes fc rgb '#AAAAFF' notitle, \
     43   'pr227.sleep0020p.hist' u 1:2:(sqrt($2)) w yerror lc rgb '#000088' notitle
     44 
     45 #------------------------------------------------------------------------------
     46 
     47 set xlabel 'Requested delay (argument of sleep) [sec]'
     48 set ylabel 'Actual delay of sleep [sec]'
     49 
     50 set title 'Scatter plot in Bash 3.2 (GNU/Linux)'
     51 set key left top Left
     52 plot [0:0.200]\
     53   'pr227.linux32.txt' u 2:1 lc rgb '#FF0000' title 'Sample points', \
     54   x lc rgb '#000000' title 'y = x'
     55 
     56 set title 'Scatter plot in Bash 5.2 (GNU/Linux)'
     57 set key left top Left
     58 plot [0:0.200]\
     59   'pr227.linux52.txt' u 2:1 lc rgb '#FF0000' title 'Sample points', \
     60   x lc rgb '#000000' title 'y = x'
     61 
     62 set title 'Scatter plot in Bash 5.1 (FreeBSD 13)'
     63 set key left top Left
     64 plot [0:0.200]\
     65   'pr227.freebsd.txt' u 2:1 lc rgb '#FF0000' title 'Sample points', \
     66   x lc rgb '#000000' title 'y = x'
     67 
     68 set title 'Scatter plot in Bash 4.4 (Cygwin)'
     69 set key left top Left
     70 plot [0:0.200]\
     71   'pr227.cygwin.txt' u 2:1 lc rgb '#FF0000' title 'Sample points', \
     72   x lc rgb '#000000' title 'y = x'
     73 
     74 set title 'Scatter plot in Bash 3.2 (macOS)'
     75 set key left top Left
     76 plot [0:0.200]\
     77   'pr227.macos32.txt' u 2:1 lc rgb '#FF0000' title 'Sample points', \
     78   x lc rgb '#000000' title 'y = x'
     79 
     80 set title 'Scatter plot in Bash 5.1 (macOS)'
     81 set key left top Left
     82 plot [0:0.200]\
     83   'pr227.macos51.txt' u 2:1 lc rgb '#FF0000' title 'Sample points', \
     84   x lc rgb '#000000' title 'y = x'