init
This commit is contained in:
76
plot.gp
Normal file
76
plot.gp
Normal file
@@ -0,0 +1,76 @@
|
||||
# Output Settings
|
||||
set terminal pngcairo size 1200,1600 enhanced font 'Segoe UI,12' linewidth 2
|
||||
set output 'benchmark_results.png'
|
||||
|
||||
# Data Settings
|
||||
set datafile separator ","
|
||||
set title font "Segoe UI,16"
|
||||
|
||||
# Layout: 3 rows, 1 column
|
||||
set multiplot layout 3,1 title "Concurrent HashMap Benchmark Results\nThroughput vs Thread Count" offset 0, -0.05 scale 1, 0.95
|
||||
|
||||
# Axis Settings
|
||||
set grid y
|
||||
set grid x
|
||||
set xlabel "Threads (Log Scale)"
|
||||
set ylabel "Throughput (Operations / Sec)"
|
||||
set logscale x 2
|
||||
set format y "%.1s%c" # Formats 1000000 as 1.0M
|
||||
|
||||
# Key (Legend) Settings
|
||||
set key outside right top box
|
||||
set key title "Configuration"
|
||||
|
||||
# Colors (Semantic Spectrum: Cool to Critical)
|
||||
c_050 = "#17becf" # Cyan (Light Load)
|
||||
c_080 = "#2ca02c" # Green (Standard)
|
||||
c_090 = "#1f77b4" # Blue (Heavy)
|
||||
c_095 = "#ff7f0e" # Orange (Warning)
|
||||
c_098 = "#d62728" # Red (Critical)
|
||||
|
||||
# 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 versions for Mutex (Index - 1 usually)
|
||||
pt_mutex_050 = 12
|
||||
pt_mutex_080 = 6
|
||||
pt_mutex_090 = 4
|
||||
pt_mutex_095 = 8
|
||||
pt_mutex_098 = 10
|
||||
|
||||
# Helper function to filter data
|
||||
# Col 1: Impl, Col 2: LF, Col 3: Workload, Col 6: Ops/Sec
|
||||
filter(workload, impl, lf) = (strcol(3) eq workload && strcol(1) eq impl && abs($2 - lf) < 0.001) ? $6 : 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