2024-05-12 20:47:09 +02:00
|
|
|
define boite {
|
|
|
|
xleft = $1
|
|
|
|
xright = $2
|
|
|
|
yup = $3
|
|
|
|
ydown = $4
|
|
|
|
|
|
|
|
line from xleft,ydown to xright,ydown
|
|
|
|
line from xleft,yup to xright,yup
|
|
|
|
line from xleft,yup to xleft,ydown
|
|
|
|
line from xright,yup to xright,ydown
|
|
|
|
}
|
|
|
|
|
2024-05-28 17:59:42 +02:00
|
|
|
define legend_line {
|
|
|
|
cy = $1
|
|
|
|
lstartx = $2
|
|
|
|
lendx = $3
|
|
|
|
tstartx = $4
|
|
|
|
|
|
|
|
.gcolor $5
|
|
|
|
line from lstartx,cy to lendx,cy
|
|
|
|
.gcolor
|
|
|
|
$6 ljust at tstartx,cy
|
|
|
|
}
|
|
|
|
|
2024-05-12 20:47:09 +02:00
|
|
|
define legend {
|
|
|
|
xleft = $1
|
|
|
|
xright = $2
|
|
|
|
yup = $3
|
|
|
|
ydown = $4
|
|
|
|
|
|
|
|
diffx = xright - xleft
|
|
|
|
diffy = yup - ydown
|
|
|
|
|
2024-05-24 00:25:28 +02:00
|
|
|
hdiff = diffy/5.7
|
2024-05-13 21:46:02 +02:00
|
|
|
cy = yup - (diffy/6)
|
2024-05-12 20:47:09 +02:00
|
|
|
cx = (diffx/20) + xleft
|
|
|
|
|
|
|
|
lstartx = cx
|
|
|
|
lendx = cx + diffx/8
|
|
|
|
tstartx = lendx + diffx/20
|
|
|
|
|
2024-05-24 00:25:28 +02:00
|
|
|
.ps -2
|
2024-05-28 17:59:42 +02:00
|
|
|
legend_line(cy,lstartx,lendx,tstartx,red,"RAM only")
|
2024-05-12 20:47:09 +02:00
|
|
|
cy = cy - hdiff
|
2024-05-28 17:59:42 +02:00
|
|
|
legend_line(cy,lstartx,lendx,tstartx,black,"Cached db and index")
|
2024-05-12 20:47:09 +02:00
|
|
|
cy = cy - hdiff
|
2024-05-28 22:28:08 +02:00
|
|
|
legend_line(cy,lstartx,lendx,tstartx,pink,"Common db, cached index")
|
2024-05-24 00:25:28 +02:00
|
|
|
cy = cy - hdiff
|
2024-05-28 17:59:42 +02:00
|
|
|
legend_line(cy,lstartx,lendx,tstartx,blue,"Uncached db, cached index")
|
2024-05-12 20:47:09 +02:00
|
|
|
cy = cy - hdiff
|
2024-05-28 17:59:42 +02:00
|
|
|
legend_line(cy,lstartx,lendx,tstartx,green,"Uncached db and index")
|
2024-05-24 00:25:28 +02:00
|
|
|
.ps +2
|
2024-05-12 20:47:09 +02:00
|
|
|
}
|
2024-05-26 19:03:37 +02:00
|
|
|
|
2024-05-28 04:26:26 +02:00
|
|
|
define legend_common {
|
|
|
|
xleft = $1
|
|
|
|
xright = $2
|
|
|
|
yup = $3
|
|
|
|
ydown = $4
|
|
|
|
|
|
|
|
diffx = xright - xleft
|
|
|
|
diffy = yup - ydown
|
|
|
|
|
|
|
|
hdiff = diffy/4.5
|
|
|
|
cy = yup - (diffy/6)
|
|
|
|
cx = (diffx/20) + xleft
|
|
|
|
|
|
|
|
lstartx = cx
|
|
|
|
lendx = cx + diffx/8
|
|
|
|
tstartx = lendx + diffx/20
|
|
|
|
|
|
|
|
.ps -2
|
2024-05-28 17:59:42 +02:00
|
|
|
legend_line(cy,lstartx,lendx,tstartx,red,"1k")
|
2024-05-28 04:26:26 +02:00
|
|
|
cy = cy - hdiff
|
2024-05-28 17:59:42 +02:00
|
|
|
legend_line(cy,lstartx,lendx,tstartx,green,"5k")
|
2024-05-28 04:26:26 +02:00
|
|
|
cy = cy - hdiff
|
2024-05-28 17:59:42 +02:00
|
|
|
legend_line(cy,lstartx,lendx,tstartx,black,"10k")
|
2024-05-28 04:26:26 +02:00
|
|
|
cy = cy - hdiff
|
2024-05-28 17:59:42 +02:00
|
|
|
legend_line(cy,lstartx,lendx,tstartx,pink,"20k")
|
2024-05-28 04:26:26 +02:00
|
|
|
.ps +2
|
|
|
|
}
|
|
|
|
|
2024-05-26 19:03:37 +02:00
|
|
|
define legend_fifo_addition {
|
|
|
|
xleft = $1
|
|
|
|
xright = $2
|
|
|
|
yup = $3
|
|
|
|
ydown = $4
|
|
|
|
|
|
|
|
diffx = xright - xleft
|
|
|
|
diffy = yup - ydown
|
|
|
|
|
|
|
|
hdiff = diffy/3.5
|
|
|
|
cy = yup - (diffy/10)
|
|
|
|
cx = (diffx/20) + xleft
|
|
|
|
|
|
|
|
lstartx = cx
|
|
|
|
lendx = cx + diffx/8
|
|
|
|
tstartx = lendx + diffx/20
|
|
|
|
|
|
|
|
.ps -2
|
|
|
|
cy = cy - hdiff
|
2024-05-28 17:59:42 +02:00
|
|
|
legend_line(cy,lstartx,lendx,tstartx,orange,"Basic FIFO")
|
2024-05-26 19:03:37 +02:00
|
|
|
cy = cy - hdiff
|
2024-05-28 17:59:42 +02:00
|
|
|
legend_line(cy,lstartx,lendx,tstartx,green,"Efficient FIFO")
|
2024-05-26 19:03:37 +02:00
|
|
|
.ps +2
|
|
|
|
}
|
2024-05-28 17:59:42 +02:00
|
|
|
|
|
|
|
# WARNING: this macro uses "cx" (current x), y_scale and "ox" (old x).
|
|
|
|
define line_no_mustache {
|
|
|
|
# $1 = cbram
|
|
|
|
# $2 = obram
|
|
|
|
# $3 = column
|
|
|
|
# $4 = color
|
|
|
|
|
|
|
|
$1 = $3/y_scale
|
|
|
|
.gcolor $4
|
|
|
|
if ($2 > 0) then {line from cx,$1 to ox,$2}
|
|
|
|
bullet at cx,$1
|
|
|
|
.gcolor
|
|
|
|
$2 = $1
|
|
|
|
}
|
|
|
|
|
|
|
|
# WARNING: this macro uses "cx" (current x), y_scale and "ox" (old x).
|
|
|
|
define line_with_mustache {
|
|
|
|
# $1 = cbram
|
|
|
|
# $2 = obram
|
|
|
|
# $3 = column
|
|
|
|
# $4 = color
|
|
|
|
# $5 = column mustache 1
|
|
|
|
# $6 = column mustache 2
|
|
|
|
|
|
|
|
line_no_mustache($1,$2,$3,$4)
|
|
|
|
line from cx,$5/y_scale to cx,$6/y_scale
|
|
|
|
}
|
2024-05-29 16:47:56 +02:00
|
|
|
|
|
|
|
# WARNING: this macro y_scale.
|
|
|
|
define linear_growth {
|
|
|
|
# $1 = color
|
|
|
|
# $2 = duration of the retrieval for a single value
|
|
|
|
# $3 = min number of retrievals
|
|
|
|
# $4 = max number of retrievals
|
|
|
|
.gcolor $1
|
|
|
|
line dashed from $3,($2*$3)/y_scale to $4,($2*$4)/y_scale
|
|
|
|
.gcolor
|
|
|
|
}
|