toeverything / OctoBase

🐙 OctoBase is the open-source database behind AFFiNE, local-first, yet collaborative. A light-weight, scalable, data engine written in Rust.
https://octobase.dev
GNU Affero General Public License v3.0
1.32k stars 83 forks source link

feat: impl gc for doc state #522

Closed forehalo closed 1 year ago

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
octobase ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 29, 2023 6:30am
github-actions[bot] commented 1 year ago

Benchmark Results

Linux

group                                     master                                 pr
-----                                     ------                                 --
codec/jwst decode var_int (32 bit)        1.00    316.9±0.31µs        ? ?/sec    1.00    317.1±0.30µs        ? ?/sec
codec/jwst decode var_uint (32 bit)       1.00    272.4±1.00µs        ? ?/sec    1.01   276.0±11.79µs        ? ?/sec
codec/jwst decode var_uint (64 bit)       1.00    308.1±0.20µs        ? ?/sec    1.02    314.7±8.54µs        ? ?/sec
codec/jwst encode var_int (32 bit)        1.00    386.9±0.74µs        ? ?/sec    1.00    386.8±0.49µs        ? ?/sec
codec/jwst encode var_uint (32 bit)       1.00    309.8±2.74µs        ? ?/sec    1.01    311.3±1.28µs        ? ?/sec
codec/jwst encode var_uint (64 bit)       1.00    309.3±1.05µs        ? ?/sec    1.01    311.9±1.67µs        ? ?/sec
codec/lib0 decode var_int (64 bit)        1.01    281.6±4.29µs        ? ?/sec    1.00    277.7±2.47µs        ? ?/sec
codec/lib0 decode var_uint (32 bit)       1.00    239.1±4.27µs        ? ?/sec    1.00    238.1±2.99µs        ? ?/sec
codec/lib0 decode var_uint (64 bit)       1.00    235.7±1.84µs        ? ?/sec    1.00    235.3±1.19µs        ? ?/sec
codec/lib0 encode var_int (64 bit)        1.00    431.1±7.07µs        ? ?/sec    1.02    441.5±4.29µs        ? ?/sec
codec/lib0 encode var_uint (32 bit)       1.01    380.3±0.93µs        ? ?/sec    1.00    378.0±0.80µs        ? ?/sec
codec/lib0 encode var_uint (64 bit)       1.00    302.9±0.57µs        ? ?/sec    1.00    303.0±0.62µs        ? ?/sec
ops/array/jwst/insert                     1.00    399.5±0.96µs        ? ?/sec    1.00    397.5±1.78µs        ? ?/sec
ops/array/jwst/insert range               1.01    538.4±0.28µs        ? ?/sec    1.00    534.8±3.08µs        ? ?/sec
ops/array/jwst/remove                     1.00    277.2±0.12µs        ? ?/sec    1.01    279.8±0.15µs        ? ?/sec
ops/array/yrs/insert                      1.00     88.0±0.07µs        ? ?/sec    1.03     90.9±0.47µs        ? ?/sec
ops/array/yrs/insert range                1.00    113.0±1.18µs        ? ?/sec    1.00    113.2±0.70µs        ? ?/sec
ops/array/yrs/remove                      1.01     97.9±0.11µs        ? ?/sec    1.00     97.0±0.29µs        ? ?/sec
ops/text/jwst/insert                      1.00    152.1±0.13µs        ? ?/sec    1.04    157.5±1.55µs        ? ?/sec
ops/text/jwst/remove                      1.00      3.4±0.00µs        ? ?/sec    1.00      3.4±0.00µs        ? ?/sec
ops/text/yrs/insert                       1.00     42.2±0.03µs        ? ?/sec    1.02     43.0±0.04µs        ? ?/sec
ops/text/yrs/remove                       1.03      2.5±0.00µs        ? ?/sec    1.00      2.4±0.00µs        ? ?/sec
update/parse with jwst/basic.bin          1.02     67.5±0.81µs    80.9 MB/sec    1.00     66.0±0.04µs    82.8 MB/sec
update/parse with jwst/database.bin       1.02     54.0±0.10µs    61.3 MB/sec    1.00     53.2±0.02µs    62.2 MB/sec
update/parse with jwst/large.bin          1.00      3.5±0.00ms    65.7 MB/sec    1.00      3.5±0.00ms    65.4 MB/sec
update/parse with jwst/with-subdoc.bin    1.00      6.1±0.01µs   114.4 MB/sec    1.00      6.1±0.01µs   114.7 MB/sec
update/parse with yrs/basic.bin           1.00     41.8±0.72µs   130.7 MB/sec    1.01     42.1±0.07µs   129.8 MB/sec
update/parse with yrs/database.bin        1.00     33.5±0.21µs    98.9 MB/sec    1.02     34.0±0.19µs    97.4 MB/sec
update/parse with yrs/large.bin           1.00      2.1±0.01ms   108.1 MB/sec    1.01      2.1±0.02ms   106.9 MB/sec
update/parse with yrs/with-subdoc.bin     1.02      5.3±0.00µs   130.9 MB/sec    1.00      5.3±0.00µs   132.9 MB/sec

Windows

group                                     master                                 pr
-----                                     ------                                 --
codec/jwst decode var_int (32 bit)        1.00   571.5±28.14µs        ? ?/sec    1.00   569.2±24.04µs        ? ?/sec
codec/jwst decode var_uint (32 bit)       1.01   536.7±23.84µs        ? ?/sec    1.00   532.9±25.13µs        ? ?/sec
codec/jwst decode var_uint (64 bit)       1.02   603.3±28.82µs        ? ?/sec    1.00   593.1±34.89µs        ? ?/sec
codec/jwst encode var_int (32 bit)        1.00   527.6±21.45µs        ? ?/sec    1.03   543.1±33.43µs        ? ?/sec
codec/jwst encode var_uint (32 bit)       1.03   505.2±20.59µs        ? ?/sec    1.00   490.5±24.42µs        ? ?/sec
codec/jwst encode var_uint (64 bit)       1.01   498.2±20.03µs        ? ?/sec    1.00   491.1±21.44µs        ? ?/sec
codec/lib0 decode var_int (64 bit)        1.00   497.6±26.18µs        ? ?/sec    1.05   523.4±24.53µs        ? ?/sec
codec/lib0 decode var_uint (32 bit)       1.00   454.5±21.37µs        ? ?/sec    1.04   473.5±22.04µs        ? ?/sec
codec/lib0 decode var_uint (64 bit)       1.00   292.8±10.90µs        ? ?/sec    1.01   294.5±11.30µs        ? ?/sec
codec/lib0 encode var_int (64 bit)        1.00   681.0±35.76µs        ? ?/sec    1.07   727.0±34.65µs        ? ?/sec
codec/lib0 encode var_uint (32 bit)       1.00   448.6±29.67µs        ? ?/sec    1.09   490.3±25.57µs        ? ?/sec
codec/lib0 encode var_uint (64 bit)       1.00   446.7±17.48µs        ? ?/sec    1.04   465.6±19.52µs        ? ?/sec
ops/array/jwst/insert                     1.01   506.3±15.28µs        ? ?/sec    1.00   503.7±13.85µs        ? ?/sec
ops/array/jwst/insert range               1.00   668.5±19.03µs        ? ?/sec    1.02   682.8±21.62µs        ? ?/sec
ops/array/jwst/remove                     1.00    327.4±9.73µs        ? ?/sec    1.01   331.5±10.90µs        ? ?/sec
ops/array/yrs/insert                      1.00    128.8±4.28µs        ? ?/sec    1.04    134.5±5.31µs        ? ?/sec
ops/array/yrs/insert range                1.00    184.0±6.46µs        ? ?/sec    1.00    183.4±5.24µs        ? ?/sec
ops/array/yrs/remove                      1.00    188.1±5.55µs        ? ?/sec    1.01    190.3±6.41µs        ? ?/sec
ops/text/jwst/insert                      1.00    226.6±6.22µs        ? ?/sec    1.01    228.7±7.50µs        ? ?/sec
ops/text/jwst/remove                      1.00      5.8±0.27µs        ? ?/sec    1.01      5.9±0.25µs        ? ?/sec
ops/text/yrs/insert                       1.00     57.5±2.00µs        ? ?/sec    1.00     57.5±1.83µs        ? ?/sec
ops/text/yrs/remove                       1.23      5.7±0.16µs        ? ?/sec    1.00      4.7±0.16µs        ? ?/sec
update/parse with jwst/basic.bin          1.02    124.0±3.90µs    44.0 MB/sec    1.00    121.4±5.53µs    45.0 MB/sec
update/parse with jwst/database.bin       1.05     97.8±3.65µs    33.9 MB/sec    1.00     93.0±2.77µs    35.6 MB/sec
update/parse with jwst/large.bin          1.02      5.7±0.21ms    39.9 MB/sec    1.00      5.6±0.20ms    40.9 MB/sec
update/parse with jwst/with-subdoc.bin    1.10     18.7±0.76µs    37.5 MB/sec    1.00     17.0±0.43µs    41.3 MB/sec
update/parse with yrs/basic.bin           1.00     79.2±3.03µs    68.9 MB/sec    1.05     82.8±3.23µs    66.0 MB/sec
update/parse with yrs/database.bin        1.00     61.8±2.94µs    53.6 MB/sec    1.01     62.6±1.83µs    52.9 MB/sec
update/parse with yrs/large.bin           1.00      3.9±0.18ms    58.9 MB/sec    1.01      3.9±0.22ms    58.2 MB/sec
update/parse with yrs/with-subdoc.bin     1.00     14.0±0.30µs    50.1 MB/sec    1.03     14.3±0.60µs    48.8 MB/sec
codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 70.98% and project coverage change: -0.17% :warning:

Comparison is base (3b294dd) 64.53% compared to head (3737d45) 64.37%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #522 +/- ## ========================================== - Coverage 64.53% 64.37% -0.17% ========================================== Files 177 177 Lines 20544 20777 +233 ========================================== + Hits 13259 13375 +116 - Misses 7285 7402 +117 ``` | [Files Changed](https://app.codecov.io/gh/toeverything/OctoBase/pull/522?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toeverything) | Coverage Δ | | |---|---|---| | [libs/jwst-codec/src/doc/codec/any.rs](https://app.codecov.io/gh/toeverything/OctoBase/pull/522?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toeverything#diff-bGlicy9qd3N0LWNvZGVjL3NyYy9kb2MvY29kZWMvYW55LnJz) | `82.36% <0.00%> (-4.06%)` | :arrow_down: | | [libs/jwst-codec/src/doc/codec/content.rs](https://app.codecov.io/gh/toeverything/OctoBase/pull/522?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toeverything#diff-bGlicy9qd3N0LWNvZGVjL3NyYy9kb2MvY29kZWMvY29udGVudC5ycw==) | `85.08% <ø> (ø)` | | | [libs/jwst-codec/src/lib.rs](https://app.codecov.io/gh/toeverything/OctoBase/pull/522?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toeverything#diff-bGlicy9qd3N0LWNvZGVjL3NyYy9saWIucnM=) | `100.00% <ø> (ø)` | | | [libs/jwst-codec/src/doc/codec/item.rs](https://app.codecov.io/gh/toeverything/OctoBase/pull/522?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toeverything#diff-bGlicy9qd3N0LWNvZGVjL3NyYy9kb2MvY29kZWMvaXRlbS5ycw==) | `71.56% <50.00%> (+0.36%)` | :arrow_up: | | [libs/jwst-codec/src/doc/document.rs](https://app.codecov.io/gh/toeverything/OctoBase/pull/522?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toeverything#diff-bGlicy9qd3N0LWNvZGVjL3NyYy9kb2MvZG9jdW1lbnQucnM=) | `68.78% <55.84%> (-6.52%)` | :arrow_down: | | [libs/jwst-codec/src/doc/types/mod.rs](https://app.codecov.io/gh/toeverything/OctoBase/pull/522?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toeverything#diff-bGlicy9qd3N0LWNvZGVjL3NyYy9kb2MvdHlwZXMvbW9kLnJz) | `72.92% <60.00%> (+0.26%)` | :arrow_up: | | [libs/jwst-codec/src/doc/store.rs](https://app.codecov.io/gh/toeverything/OctoBase/pull/522?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toeverything#diff-bGlicy9qd3N0LWNvZGVjL3NyYy9kb2Mvc3RvcmUucnM=) | `83.42% <74.16%> (-4.54%)` | :arrow_down: | | [libs/jwst-codec/src/doc/common/range.rs](https://app.codecov.io/gh/toeverything/OctoBase/pull/522?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toeverything#diff-bGlicy9qd3N0LWNvZGVjL3NyYy9kb2MvY29tbW9uL3JhbmdlLnJz) | `92.05% <100.00%> (+1.09%)` | :arrow_up: | | [libs/jwst-codec/src/doc/types/array.rs](https://app.codecov.io/gh/toeverything/OctoBase/pull/522?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toeverything#diff-bGlicy9qd3N0LWNvZGVjL3NyYy9kb2MvdHlwZXMvYXJyYXkucnM=) | `94.44% <100.00%> (-0.53%)` | :arrow_down: | | [libs/jwst-codec/src/doc/types/list/mod.rs](https://app.codecov.io/gh/toeverything/OctoBase/pull/522?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toeverything#diff-bGlicy9qd3N0LWNvZGVjL3NyYy9kb2MvdHlwZXMvbGlzdC9tb2QucnM=) | `86.66% <100.00%> (-0.09%)` | :arrow_down: | | ... and [3 more](https://app.codecov.io/gh/toeverything/OctoBase/pull/522?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toeverything) | | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/toeverything/OctoBase/pull/522/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toeverything)

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