You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CP-307958: small DB improvements and benchmarks (#6461)
We were converting events to RPC.t twice: first using the internal OCaml
names, and then mapping them back to some "wire" names. This can be done
a lot more simply by generating the wire names in the first place (the
ppx support overriding the wire name of fields).
`ministat` confirms an improvement on `rpc_of_event`:
```
N Min Max Median Avg Stddev
x 922 440.79126 46094.975 467.83727 563.79259 1676.0843
+ 1131 51.346821 33407.866 58.715393 115.98006 1105.4178
Difference at 95.0% confidence
-447.813 +/- 120.966
-79.4286% +/- 13.1488%
(Student's t, pooled s = 1390.95)
```
Atomic is also faster than an integer wrapped with a mutex:
```
Mutex+incr (ns):
{ monotonic-clock per run = 32.272091 (confidence: 32.365531 to 32.170138);
r² = Some 0.999441 }
Atomic.incr (ns):
{ monotonic-clock per run = 2.938678 (confidence: 2.944486 to 2.933688);
r² = Some 0.999857 }
```
I've added some new new benchmarks for event field conversion, atomic vs
mutex and DB field writes.
0 commit comments