dodb.cr/graphs/graphs.ms

249 lines
5.4 KiB
Plaintext
Raw Normal View History

2024-05-12 16:47:53 +02:00
.NH
2024-05-12 19:24:50 +02:00
Indexes
2024-05-12 16:47:53 +02:00
.LP
.G1
2024-05-12 19:24:50 +02:00
frame invis ht 3 wid 4 left solid bot solid
coord y 0,50
ticks left out from 0 to 50 by 10
label left "Request duration with" unaligned "an index (us)" "(Median)" left 1
label bot "Number of cars in the database"
2024-05-12 16:47:53 +02:00
# minx = 1e12; maxx = -1e12
n = sigx = sigx2 = sigy = sigxy = 0
2024-05-12 19:24:50 +02:00
obram = obuncache = obcache = obsemi = 0 # old bullets
cbram = cbuncache = cbcache = cbsemi = 0 # current bullets
2024-05-12 16:47:53 +02:00
copy "../data/index.d" thru X
cx = $1*5
2024-05-12 19:24:50 +02:00
y_scale = 1000
2024-05-12 16:47:53 +02:00
# ram cached semi uncached
2024-05-12 19:24:50 +02:00
line from cx,$2/y_scale to cx,$4/y_scale
line from cx,$5/y_scale to cx,$7/y_scale
line from cx,$8/y_scale to cx,$10/y_scale
line from cx,$11/y_scale to cx,$13/y_scale
2024-05-12 16:47:53 +02:00
#ty = $3
cx = $1*5
2024-05-12 19:24:50 +02:00
cbram = $3/y_scale
cbcache = $6/y_scale
cbsemi = $9/y_scale
cbuncache = $12/y_scale
2024-05-12 16:47:53 +02:00
if (obram > 0) then {line from cx,cbram to ox,obram}
if (obcache > 0) then {line from cx,cbcache to ox,obcache}
.gcolor blue
if (obsemi > 0) then {line from cx,cbsemi to ox,obsemi}
.gcolor
.gcolor green
if (obuncache > 0) then {line from cx,cbuncache to ox,obuncache}
.gcolor
obram = cbram
obcache = cbcache
obsemi = cbsemi
obuncache = cbuncache
ox = cx
# ram cached semi uncached
.gcolor red
bullet at cx,cbram
.gcolor
bullet at cx,cbcache
.gcolor blue
bullet at cx,cbsemi
.gcolor
.gcolor green
bullet at cx,cbuncache
.gcolor
#n = n+1
#sigx = sigx+$1; sigx2 = sigx2+$1*$1
#sigy = sigy+ty; sigxy = sigxy+$1*ty
#minx = min(minx,$1); maxx = max(maxx,$1)
X
## Calculate least squares fit and draw it
#slope = (n*sigxy - sigx*sigy) / (n*sigx2 - sigx*sigx)
#inter = (sigy - slope*sigx) / n
## print slope; print inter
#line from minx,slope*minx+inter to maxx,slope*maxx+inter
.G2
2024-05-12 19:24:50 +02:00
.NH
Partitions
.LP
2024-05-12 16:47:53 +02:00
.G1
2024-05-12 19:24:50 +02:00
frame invis ht 3 wid 4 left solid bot solid
coord x 0,5000*2 y 0,350
ticks left out from 0 to 350 by 50
label left "Request duration for a partition (ms)" unaligned "(Median)" left 1.2
label bot "Number of cars matching the partition"
2024-05-12 16:47:53 +02:00
# minx = 1e12; maxx = -1e12
n = sigx = sigx2 = sigy = sigxy = 0
obram = obuncache = obcache = obsemi = 0
cbram = cbuncache = cbcache = cbsemi = 0
copy "../data/partitions.d" thru X
2024-05-12 19:24:50 +02:00
cx = $1*2
y_scale = 1000000
2024-05-12 16:47:53 +02:00
# ram cached semi uncached
2024-05-12 19:24:50 +02:00
line from cx,$2/y_scale to cx,$4/y_scale
line from cx,$5/y_scale to cx,$7/y_scale
line from cx,$8/y_scale to cx,$10/y_scale
line from cx,$11/y_scale to cx,$13/y_scale
2024-05-12 16:47:53 +02:00
#ty = $3
2024-05-12 19:24:50 +02:00
cbram = $3/y_scale
cbcache = $6/y_scale
cbsemi = $9/y_scale
cbuncache = $12/y_scale
2024-05-12 16:47:53 +02:00
if (obram > 0) then {line from cx,cbram to ox,obram}
if (obcache > 0) then {line from cx,cbcache to ox,obcache}
.gcolor blue
if (obsemi > 0) then {line from cx,cbsemi to ox,obsemi}
.gcolor
.gcolor green
if (obuncache > 0) then {line from cx,cbuncache to ox,obuncache}
.gcolor
obram = cbram
obcache = cbcache
obsemi = cbsemi
obuncache = cbuncache
ox = cx
# ram cached semi uncached
.gcolor red
bullet at cx,cbram
.gcolor
bullet at cx,cbcache
.gcolor blue
bullet at cx,cbsemi
.gcolor
.gcolor green
bullet at cx,cbuncache
.gcolor
#n = n+1
#sigx = sigx+$1; sigx2 = sigx2+$1*$1
#sigy = sigy+ty; sigxy = sigxy+$1*ty
#minx = min(minx,$1); maxx = max(maxx,$1)
X
## Calculate least squares fit and draw it
#slope = (n*sigxy - sigx*sigy) / (n*sigx2 - sigx*sigx)
#inter = (sigy - slope*sigx) / n
## print slope; print inter
#line from minx,slope*minx+inter to maxx,slope*maxx+inter
.G2
2024-05-12 19:24:50 +02:00
.bp
.NH
Tags
.LP
2024-05-12 16:47:53 +02:00
.G1
2024-05-12 19:24:50 +02:00
label left "Request duration for a tag (ms)" unaligned "(Median)" left 1.2
label bot "Number of cars matching the tag"
2024-05-12 16:47:53 +02:00
# minx = 1e12; maxx = -1e12
n = sigx = sigx2 = sigy = sigxy = 0
obram = obuncache = obcache = obsemi = 0
cbram = cbuncache = cbcache = cbsemi = 0
2024-05-12 19:24:50 +02:00
coord x 0,5000 y 0,170
ticks left out from 0 to 170 by 20
2024-05-12 16:47:53 +02:00
2024-05-12 19:24:50 +02:00
frame invis ht 2 wid 4 left solid bot solid
2024-05-12 16:47:53 +02:00
copy "../data/tags.d" thru X
2024-05-12 19:24:50 +02:00
cx = $1
y_scale = 1000000
2024-05-12 16:47:53 +02:00
# ram cached semi uncached
2024-05-12 19:24:50 +02:00
line from cx,$2/y_scale to cx,$4/y_scale
line from cx,$5/y_scale to cx,$7/y_scale
line from cx,$8/y_scale to cx,$10/y_scale
line from cx,$11/y_scale to cx,$13/y_scale
2024-05-12 16:47:53 +02:00
#ty = $3
2024-05-12 19:24:50 +02:00
cbram = $3/y_scale
cbcache = $6/y_scale
cbsemi = $9/y_scale
cbuncache = $12/y_scale
2024-05-12 16:47:53 +02:00
if (obram > 0) then {line from cx,cbram to ox,obram}
if (obcache > 0) then {line from cx,cbcache to ox,obcache}
.gcolor blue
if (obsemi > 0) then {line from cx,cbsemi to ox,obsemi}
.gcolor
.gcolor green
if (obuncache > 0) then {line from cx,cbuncache to ox,obuncache}
.gcolor
obram = cbram
obcache = cbcache
obsemi = cbsemi
obuncache = cbuncache
ox = cx
# ram cached semi uncached
.gcolor red
bullet at cx,cbram
.gcolor
bullet at cx,cbcache
.gcolor blue
bullet at cx,cbsemi
.gcolor
.gcolor green
bullet at cx,cbuncache
.gcolor
#n = n+1
#sigx = sigx+$1; sigx2 = sigx2+$1*$1
#sigy = sigy+ty; sigxy = sigxy+$1*ty
#minx = min(minx,$1); maxx = max(maxx,$1)
X
## Calculate least squares fit and draw it
#slope = (n*sigxy - sigx*sigy) / (n*sigx2 - sigx*sigx)
#inter = (sigy - slope*sigx) / n
## print slope; print inter
#line from minx,slope*minx+inter to maxx,slope*maxx+inter
.G2
.\" .G1
.\" GROWTHFACTOR=0.07
.\" grid bot dotted from 0 to 100 by 10
.\" grid left dotted from 0 to 800 by 50
.\" frame ht 2.5 wid 2.8
.\" define expo { $1+$1*GROWTHFACTOR }
.\" value = 1
.\" draw LINEAR solid
.\" for i from 1 to 100 by 1 do {
.\" next LINEAR at i, i
.\" times at i, value
.\" value = expo(value)
.\" }
.\" line from 0,650 to 3,650
.\" " linear curve" ljust at 1,650
.\" " exponential curve" ljust at 1,600
.\" times at 1,600
.\" label top "Exponential curves: growth over time (7%)" up -.2
.\" .G2