y-crdt / y-octo

CRDT implementation which is compatible with https://github.com/yjs/yjs
https://octobase.pro/
Other
187 stars 5 forks source link

perf: avoid sort and squash on every push #38

Closed forehalo closed 8 months ago

forehalo commented 8 months ago
image
codecov-commenter commented 8 months ago

Codecov Report

Attention: 12 lines in your changes are missing coverage. Please review.

Comparison is base (58ab09a) 78.46% compared to head (5efbfcb) 78.35%.

Files Patch % Lines
y-octo/src/doc/common/range.rs 84.61% 12 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #38 +/- ## ========================================== - Coverage 78.46% 78.35% -0.12% ========================================== Files 50 50 Lines 7640 7640 ========================================== - Hits 5995 5986 -9 - Misses 1645 1654 +9 ``` | [Flag](https://app.codecov.io/gh/y-crdt/y-octo/pull/38/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [node-binding-test](https://app.codecov.io/gh/y-crdt/y-octo/pull/38/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | `36.92% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

github-actions[bot] commented 8 months ago

Benchmark for Linux

Click to view benchmark | Test | Base | PR | % | | --- | --- | --- | --- | | codec/jwst decode var_int (32 bit) | 212.9±0.72µs | 213.1±1.03µs | **+0.09%** | | codec/jwst decode var_uint (32 bit) | 178.1±0.65µs | 178.1±0.53µs | -0.00% | | codec/jwst decode var_uint (64 bit) | 206.5±2.08µs | 206.3±0.70µs | **-0.10%** | | codec/jwst encode var_int (32 bit) | 305.7±17.85µs | 303.1±1.66µs | **-0.85%** | | codec/jwst encode var_uint (32 bit) | 254.5±14.14µs | 252.9±7.27µs | -0.63% | | codec/jwst encode var_uint (64 bit) | 252.1±7.22µs | 250.9±3.50µs | -0.48% | | codec/lib0 decode var_int (64 bit) | 185.8±2.14µs | 185.8±2.20µs | -0.00% | | codec/lib0 decode var_uint (32 bit) | 153.6±2.49µs | 153.9±3.05µs | +0.20% | | codec/lib0 decode var_uint (64 bit) | 153.3±2.25µs | 154.1±2.63µs | +0.52% | | codec/lib0 encode var_int (64 bit) | 383.8±0.46µs | 384.0±0.69µs | **+0.05%** | | codec/lib0 encode var_uint (32 bit) | 373.4±4.50µs | 372.9±0.48µs | **-0.13%** | | codec/lib0 encode var_uint (64 bit) | 373.1±0.74µs | 372.8±0.33µs | **-0.08%** | | ops/array/jwst/insert | 105.5±0.48µs | 105.8±1.35µs | **+0.28%** | | ops/array/jwst/insert range | 158.1±1.48µs | 159.5±0.61µs | **+0.89%** | | ops/array/jwst/remove | 60.9±0.22µs | 60.0±0.34µs | **-1.48%** | | ops/array/yrs/insert | 56.7±0.37µs | 56.7±2.95µs | -0.00% | | ops/array/yrs/insert range | 74.0±0.61µs | 74.6±0.19µs | **+0.81%** | | ops/array/yrs/remove | 63.1±0.41µs | 62.1±1.15µs | **-1.58%** | | ops/map/jwst/get | 207.0±1.58ns | 206.8±1.70ns | -0.10% | | ops/map/jwst/insert | 3.0±0.03µs | 3.1±0.02µs | **+3.33%** | | ops/map/jwst/remove | 4.3±0.03µs | 4.3±0.02µs | -0.00% | | ops/map/yrs/get | 258.6±0.94ns | 262.1±1.21ns | **+1.35%** | | ops/map/yrs/insert | 3.9±0.05µs | 3.8±0.03µs | **-2.56%** | | ops/map/yrs/remove | 5.0±0.13µs | 5.0±0.01µs | -0.00% | | ops/text/jwst/insert | 68.7±0.53µs | 67.3±0.37µs | **-2.04%** | | ops/text/jwst/remove | 1450.2±5.05ns | 1392.3±9.60ns | **-3.99%** | | ops/text/yrs/insert | 27.0±0.10µs | 27.6±0.26µs | **+2.22%** | | ops/text/yrs/remove | 1724.2±14.32ns | 1805.3±63.30ns | **+4.70%** | | update/parse with jwst/basic.bin | 38.7±0.15µs | 39.6±0.22µs | **+2.33%** | | update/parse with jwst/database.bin | 29.8±0.21µs | 30.1±1.21µs | **+1.01%** | | update/parse with jwst/large.bin | 3.3±0.01ms | 3.3±0.03ms | -0.00% | | update/parse with jwst/with-subdoc.bin | 4.9±0.04µs | 5.0±0.03µs | **+2.04%** | | update/parse with yrs/basic.bin | 30.2±0.16µs | 30.2±0.47µs | -0.00% | | update/parse with yrs/database.bin | 23.6±0.88µs | 22.8±0.21µs | **-3.39%** | | update/parse with yrs/large.bin | 2.3±0.01ms | 2.4±0.01ms | **+4.35%** | | update/parse with yrs/with-subdoc.bin | 4.1±0.03µs | 4.5±0.02µs | **+9.76%** |

Benchmark for Windows

Click to view benchmark | Test | Base | PR | % | | --- | --- | --- | --- | | codec/jwst decode var_int (32 bit) | 213.0±1.30µs | 212.6±1.47µs | -0.19% | | codec/jwst decode var_uint (32 bit) | 184.9±5.43µs | 184.8±5.86µs | -0.05% | | codec/jwst decode var_uint (64 bit) | 182.5±3.55µs | 184.3±5.42µs | +0.99% | | codec/jwst encode var_int (32 bit) | 303.2±1.90µs | 303.1±3.17µs | -0.03% | | codec/jwst encode var_uint (32 bit) | 255.3±4.86µs | 249.3±6.72µs | **-2.35%** | | codec/jwst encode var_uint (64 bit) | 257.8±4.43µs | 248.2±5.77µs | **-3.72%** | | codec/lib0 decode var_int (64 bit) | 191.8±6.90µs | 187.6±4.12µs | **-2.19%** | | codec/lib0 decode var_uint (32 bit) | 154.1±5.00µs | 153.8±0.51µs | **-0.19%** | | codec/lib0 decode var_uint (64 bit) | 157.7±6.91µs | 150.5±0.71µs | **-4.57%** | | codec/lib0 encode var_int (64 bit) | 386.4±5.55µs | 385.3±1.04µs | **-0.28%** | | codec/lib0 encode var_uint (32 bit) | 378.3±11.43µs | 374.7±4.23µs | -0.95% | | codec/lib0 encode var_uint (64 bit) | 373.8±3.04µs | 374.0±0.95µs | **+0.05%** | | ops/array/jwst/insert | 123.2±0.53µs | 122.0±1.01µs | **-0.97%** | | ops/array/jwst/insert range | 179.5±0.80µs | 179.1±0.80µs | **-0.22%** | | ops/array/jwst/remove | 65.3±0.31µs | 68.2±0.15µs | **+4.44%** | | ops/array/yrs/insert | 70.8±0.55µs | 70.3±0.55µs | **-0.71%** | | ops/array/yrs/insert range | 97.7±0.54µs | 97.8±1.09µs | **+0.10%** | | ops/array/yrs/remove | 108.1±0.84µs | 107.2±0.32µs | **-0.83%** | | ops/map/jwst/get | 257.6±3.47ns | 258.4±3.19ns | +0.31% | | ops/map/jwst/insert | 4.8±0.02µs | 4.6±0.04µs | **-4.17%** | | ops/map/jwst/remove | 6.9±0.04µs | 6.5±0.02µs | **-5.80%** | | ops/map/yrs/get | 271.4±5.38ns | 271.5±6.24ns | +0.04% | | ops/map/yrs/insert | 5.8±0.03µs | 5.8±0.09µs | -0.00% | | ops/map/yrs/remove | 7.0±0.07µs | 7.3±0.03µs | **+4.29%** | | ops/text/jwst/insert | 85.5±0.77µs | 81.7±0.89µs | **-4.44%** | | ops/text/jwst/remove | 2.2±0.02µs | 2.1±0.01µs | **-4.55%** | | ops/text/yrs/insert | 33.9±0.19µs | 32.5±0.12µs | **-4.13%** | | ops/text/yrs/remove | 2.5±0.01µs | 2.5±0.04µs | -0.00% | | update/parse with jwst/basic.bin | 54.2±0.55µs | 54.0±0.58µs | **-0.37%** | | update/parse with jwst/database.bin | 42.9±0.34µs | 42.3±0.49µs | **-1.40%** | | update/parse with jwst/large.bin | 2.6±0.04ms | 2.6±0.05ms | -0.00% | | update/parse with jwst/with-subdoc.bin | 7.9±0.13µs | 7.5±0.03µs | **-5.06%** | | update/parse with yrs/basic.bin | 43.7±0.23µs | 44.0±0.17µs | **+0.69%** | | update/parse with yrs/database.bin | 35.4±0.26µs | 34.5±0.44µs | **-2.54%** | | update/parse with yrs/large.bin | 2.2±0.08ms | 2.2±0.10ms | -0.00% | | update/parse with yrs/with-subdoc.bin | 7.3±0.04µs | 7.3±0.06µs | -0.00% |