init
This commit is contained in:
68
plot_speedup.gp
Normal file
68
plot_speedup.gp
Normal file
@@ -0,0 +1,68 @@
|
||||
# Output Settings
|
||||
set terminal pngcairo size 1200,1600 enhanced linewidth 2
|
||||
set output 'speedup_results.png'
|
||||
set datafile separator ","
|
||||
set multiplot layout 3,1 title "Concurrent HashMap Benchmark Results\nSpeedup vs Thread Count" offset 0, -0.05 scale 1, 0.95
|
||||
|
||||
# Axis Settings
|
||||
set grid y
|
||||
set grid x
|
||||
set xlabel "Threads"
|
||||
set ylabel "Speedup"
|
||||
set logscale x 2
|
||||
set format y "%.1f"
|
||||
set yrange [0:*]
|
||||
|
||||
# Key (Legend) Settings
|
||||
set key outside right top box
|
||||
set key title "Configuration"
|
||||
|
||||
# Colors
|
||||
c_050 = "#17becf" # Cyan
|
||||
c_080 = "#2ca02c" # Green
|
||||
c_090 = "#1f77b4" # Blue
|
||||
c_095 = "#ff7f0e" # Orange
|
||||
c_098 = "#d62728" # Red
|
||||
|
||||
# Point Types (Shapes)
|
||||
# 13=Diamond, 7=Circle, 5=Square, 9=Triangle Up, 11=Triangle Down
|
||||
pt_conc_050 = 13
|
||||
pt_conc_080 = 7
|
||||
pt_conc_090 = 5
|
||||
pt_conc_095 = 9
|
||||
pt_conc_098 = 11
|
||||
# Open version for Mutex
|
||||
pt_mutex_080 = 6
|
||||
|
||||
# Helper function to filter data
|
||||
# Col 1: Impl, Col 2: LF, Col 3: Workload, Col 7: Speedup
|
||||
filter(workload, impl, lf) = (strcol(3) eq workload && strcol(1) eq impl && abs($2 - lf) < 0.001) ? $7 : 1/0
|
||||
|
||||
set title "Workload: Read-Heavy (3% Put, 2% Remove, 95% Get)"
|
||||
plot \
|
||||
'benchmark_results.csv' every ::1 using 4:(filter("Read-Heavy", "Concurrent", 0.50)) w lp lc rgb c_050 pt pt_conc_050 t "Concurrent (LF 0.50)", \
|
||||
'benchmark_results.csv' every ::1 using 4:(filter("Read-Heavy", "Concurrent", 0.80)) w lp lc rgb c_080 pt pt_conc_080 t "Concurrent (LF 0.80)", \
|
||||
'benchmark_results.csv' every ::1 using 4:(filter("Read-Heavy", "Concurrent", 0.90)) w lp lc rgb c_090 pt pt_conc_090 t "Concurrent (LF 0.90)", \
|
||||
'benchmark_results.csv' every ::1 using 4:(filter("Read-Heavy", "Concurrent", 0.95)) w lp lc rgb c_095 pt pt_conc_095 t "Concurrent (LF 0.95)", \
|
||||
'benchmark_results.csv' every ::1 using 4:(filter("Read-Heavy", "Concurrent", 0.98)) w lp lc rgb c_098 pt pt_conc_098 t "Concurrent (LF 0.98)", \
|
||||
'benchmark_results.csv' every ::1 using 4:(filter("Read-Heavy", "Mutex", 0.80)) w lp lc rgb c_080 dt 2 pt pt_mutex_080 t "Mutex (LF 0.80)",
|
||||
|
||||
set title "Workload: Balanced (25% Put, 25% Remove, 50% Get)"
|
||||
plot \
|
||||
'benchmark_results.csv' every ::1 using 4:(filter("Balanced", "Concurrent", 0.50)) w lp lc rgb c_050 pt pt_conc_050 t "Concurrent (LF 0.50)", \
|
||||
'benchmark_results.csv' every ::1 using 4:(filter("Balanced", "Concurrent", 0.80)) w lp lc rgb c_080 pt pt_conc_080 t "Concurrent (LF 0.80)", \
|
||||
'benchmark_results.csv' every ::1 using 4:(filter("Balanced", "Concurrent", 0.90)) w lp lc rgb c_090 pt pt_conc_090 t "Concurrent (LF 0.90)", \
|
||||
'benchmark_results.csv' every ::1 using 4:(filter("Balanced", "Concurrent", 0.95)) w lp lc rgb c_095 pt pt_conc_095 t "Concurrent (LF 0.95)", \
|
||||
'benchmark_results.csv' every ::1 using 4:(filter("Balanced", "Concurrent", 0.98)) w lp lc rgb c_098 pt pt_conc_098 t "Concurrent (LF 0.98)", \
|
||||
'benchmark_results.csv' every ::1 using 4:(filter("Balanced", "Mutex", 0.80)) w lp lc rgb c_080 dt 2 pt pt_mutex_080 t "Mutex (LF 0.80)",
|
||||
|
||||
set title "Workload: Write-Heavy (45% Put, 45% Remove, 10% Get)"
|
||||
plot \
|
||||
'benchmark_results.csv' every ::1 using 4:(filter("Write-Heavy", "Concurrent", 0.50)) w lp lc rgb c_050 pt pt_conc_050 t "Concurrent (LF 0.50)", \
|
||||
'benchmark_results.csv' every ::1 using 4:(filter("Write-Heavy", "Concurrent", 0.80)) w lp lc rgb c_080 pt pt_conc_080 t "Concurrent (LF 0.80)", \
|
||||
'benchmark_results.csv' every ::1 using 4:(filter("Write-Heavy", "Concurrent", 0.90)) w lp lc rgb c_090 pt pt_conc_090 t "Concurrent (LF 0.90)", \
|
||||
'benchmark_results.csv' every ::1 using 4:(filter("Write-Heavy", "Concurrent", 0.95)) w lp lc rgb c_095 pt pt_conc_095 t "Concurrent (LF 0.95)", \
|
||||
'benchmark_results.csv' every ::1 using 4:(filter("Write-Heavy", "Concurrent", 0.98)) w lp lc rgb c_098 pt pt_conc_098 t "Concurrent (LF 0.98)", \
|
||||
'benchmark_results.csv' every ::1 using 4:(filter("Write-Heavy", "Mutex", 0.80)) w lp lc rgb c_080 dt 2 pt pt_mutex_080 t "Mutex (LF 0.80)",
|
||||
|
||||
unset multiplot
|
||||
Reference in New Issue
Block a user