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.38k stars 91 forks source link

feat: add loom to test multi-thread ops #485

Closed darkskygit closed 1 year ago

darkskygit commented 1 year ago

about #479

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 Jul 6, 2023 4:38am
codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 93.51% and project coverage change: +0.13 :tada:

Comparison is base (55de4cc) 67.82% compared to head (e659e37) 67.96%.

:exclamation: Current head e659e37 differs from pull request most recent head fbb6bcc. Consider uploading reports for the commit fbb6bcc to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #485 +/- ## ========================================== + Coverage 67.82% 67.96% +0.13% ========================================== Files 166 166 Lines 18772 19020 +248 ========================================== + Hits 12733 12927 +194 - Misses 6039 6093 +54 ``` | [Impacted Files](https://app.codecov.io/gh/toeverything/OctoBase/pull/485?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/types/mod.rs](https://app.codecov.io/gh/toeverything/OctoBase/pull/485?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toeverything#diff-bGlicy9qd3N0LWNvZGVjL3NyYy9kb2MvdHlwZXMvbW9kLnJz) | `71.69% <ø> (ø)` | | | [libs/jwst-codec/src/lib.rs](https://app.codecov.io/gh/toeverything/OctoBase/pull/485?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/types/array.rs](https://app.codecov.io/gh/toeverything/OctoBase/pull/485?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toeverything#diff-bGlicy9qd3N0LWNvZGVjL3NyYy9kb2MvdHlwZXMvYXJyYXkucnM=) | `66.03% <66.66%> (+6.18%)` | :arrow_up: | | [...ibs/jwst-codec/src/doc/types/list/search\_marker.rs](https://app.codecov.io/gh/toeverything/OctoBase/pull/485?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toeverything#diff-bGlicy9qd3N0LWNvZGVjL3NyYy9kb2MvdHlwZXMvbGlzdC9zZWFyY2hfbWFya2VyLnJz) | `87.31% <86.20%> (-5.55%)` | :arrow_down: | | [libs/jwst-codec/src/doc/types/text.rs](https://app.codecov.io/gh/toeverything/OctoBase/pull/485?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toeverything#diff-bGlicy9qd3N0LWNvZGVjL3NyYy9kb2MvdHlwZXMvdGV4dC5ycw==) | `94.01% <92.02%> (-4.16%)` | :arrow_down: | | [libs/jwst-codec/src/doc/document.rs](https://app.codecov.io/gh/toeverything/OctoBase/pull/485?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toeverything#diff-bGlicy9qd3N0LWNvZGVjL3NyYy9kb2MvZG9jdW1lbnQucnM=) | `78.62% <93.23%> (-4.63%)` | :arrow_down: | | [libs/jwst-codec/src/doc/store.rs](https://app.codecov.io/gh/toeverything/OctoBase/pull/485?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toeverything#diff-bGlicy9qd3N0LWNvZGVjL3NyYy9kb2Mvc3RvcmUucnM=) | `84.04% <98.38%> (+0.04%)` | :arrow_up: | | [libs/jwst-codec/src/codec/buffer.rs](https://app.codecov.io/gh/toeverything/OctoBase/pull/485?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toeverything#diff-bGlicy9qd3N0LWNvZGVjL3NyYy9jb2RlYy9idWZmZXIucnM=) | `100.00% <100.00%> (ø)` | | | [libs/jwst-codec/src/doc/awareness.rs](https://app.codecov.io/gh/toeverything/OctoBase/pull/485?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toeverything#diff-bGlicy9qd3N0LWNvZGVjL3NyYy9kb2MvYXdhcmVuZXNzLnJz) | `99.42% <100.00%> (+<0.01%)` | :arrow_up: | | [libs/jwst-codec/src/doc/codec/any.rs](https://app.codecov.io/gh/toeverything/OctoBase/pull/485?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toeverything#diff-bGlicy9qd3N0LWNvZGVjL3NyYy9kb2MvY29kZWMvYW55LnJz) | `93.86% <100.00%> (+0.02%)` | :arrow_up: | | ... and [7 more](https://app.codecov.io/gh/toeverything/OctoBase/pull/485?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toeverything) | | ... and [7 files with indirect coverage changes](https://app.codecov.io/gh/toeverything/OctoBase/pull/485/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: Do you have feedback about the report comment? Let us know in this issue.

github-actions[bot] commented 1 year ago

Benchmark Results

Linux

group                                  master                                 pr
-----                                  ------                                 --
codec/jwst decode var_int (32 bit)     1.00    314.7±0.14µs        ? ?/sec    1.00    314.8±0.25µs        ? ?/sec
codec/jwst decode var_int (64 bit)     1.02    378.1±8.02µs        ? ?/sec    1.00    371.3±9.09µs        ? ?/sec
codec/jwst decode var_uint (32 bit)    1.00    276.1±1.31µs        ? ?/sec    1.01    277.5±0.96µs        ? ?/sec
codec/jwst decode var_uint (64 bit)    1.00    308.1±0.51µs        ? ?/sec    1.00    308.2±0.47µs        ? ?/sec
codec/jwst encode var_int (32 bit)     1.00    392.3±1.20µs        ? ?/sec    1.00    392.2±0.77µs        ? ?/sec
codec/jwst encode var_int (64 bit)     1.00    412.7±8.83µs        ? ?/sec    1.00    411.1±8.19µs        ? ?/sec
codec/jwst encode var_uint (32 bit)    1.00    375.2±0.12µs        ? ?/sec    1.00    375.4±0.13µs        ? ?/sec
codec/jwst encode var_uint (64 bit)    1.00    375.2±0.09µs        ? ?/sec    1.00    375.4±0.15µs        ? ?/sec
codec/lib0 decode var_int (64 bit)     1.00    275.3±0.62µs        ? ?/sec    1.00    275.5±0.82µs        ? ?/sec
codec/lib0 decode var_uint (32 bit)    1.00   253.0±13.19µs        ? ?/sec    1.10    278.4±1.54µs        ? ?/sec
codec/lib0 decode var_uint (64 bit)    1.01    291.4±4.04µs        ? ?/sec    1.00    288.1±3.56µs        ? ?/sec
codec/lib0 encode var_int (64 bit)     1.00    411.4±4.87µs        ? ?/sec    1.03    423.7±3.47µs        ? ?/sec
codec/lib0 encode var_uint (32 bit)    1.00    300.9±4.83µs        ? ?/sec    1.02    305.7±2.95µs        ? ?/sec
codec/lib0 encode var_uint (64 bit)    1.00    304.4±3.21µs        ? ?/sec    1.02    310.5±3.33µs        ? ?/sec
ops/array/jwst/insert                  1.00    401.6±0.39µs        ? ?/sec    1.00    402.5±0.25µs        ? ?/sec
ops/array/jwst/insert range            1.00    710.1±1.96µs        ? ?/sec    1.00    709.5±0.20µs        ? ?/sec
ops/array/jwst/remove                  1.00    206.9±0.26µs        ? ?/sec    1.00    207.5±0.42µs        ? ?/sec
ops/array/yrs/insert                   1.02     89.2±0.42µs        ? ?/sec    1.00     87.6±0.65µs        ? ?/sec
ops/array/yrs/insert range             1.01    111.3±0.72µs        ? ?/sec    1.00    109.7±0.40µs        ? ?/sec
ops/array/yrs/remove                   1.04     96.7±1.28µs        ? ?/sec    1.00     92.9±0.38µs        ? ?/sec
ops/text/jwst/insert                   1.00    246.2±1.15µs        ? ?/sec    1.00    246.3±0.97µs        ? ?/sec
ops/text/jwst/remove                   1.00      3.4±0.02µs        ? ?/sec    1.00      3.4±0.00µs        ? ?/sec
ops/text/yrs/insert                    1.00     42.0±0.07µs        ? ?/sec    1.00     41.9±0.07µs        ? ?/sec
ops/text/yrs/remove                    1.00      2.4±0.00µs        ? ?/sec    1.00      2.4±0.01µs        ? ?/sec
update/parse with jwst/basic.bin       1.00     52.1±0.07µs   104.9 MB/sec    1.01     52.4±0.08µs   104.3 MB/sec
update/parse with jwst/database.bin    1.00     56.5±0.04µs    58.7 MB/sec    1.07     60.2±0.02µs    55.0 MB/sec
update/parse with jwst/large.bin       1.00      3.5±0.00ms    64.5 MB/sec    1.06      3.7±0.00ms    61.0 MB/sec
update/parse with yrs/basic.bin        1.00     41.4±0.20µs   131.8 MB/sec    1.00     41.4±0.04µs   131.7 MB/sec
update/parse with yrs/database.bin     1.01     33.4±0.06µs    99.2 MB/sec    1.00     33.2±0.02µs    99.8 MB/sec
update/parse with yrs/large.bin        1.00      2.1±0.00ms   109.6 MB/sec    1.00      2.1±0.00ms   109.8 MB/sec

Windows

group                                  master                                 pr
-----                                  ------                                 --
codec/jwst decode var_int (32 bit)     1.00   524.9±21.55µs        ? ?/sec    1.00   525.0±17.57µs        ? ?/sec
codec/jwst decode var_int (64 bit)     1.00   559.7±21.34µs        ? ?/sec    1.02   569.6±22.99µs        ? ?/sec
codec/jwst decode var_uint (32 bit)    1.01   470.2±17.35µs        ? ?/sec    1.00   464.7±17.43µs        ? ?/sec
codec/jwst decode var_uint (64 bit)    1.00   387.9±14.12µs        ? ?/sec    1.01   390.8±12.52µs        ? ?/sec
codec/jwst encode var_int (32 bit)     1.00   649.5±25.15µs        ? ?/sec    1.02   661.8±27.69µs        ? ?/sec
codec/jwst encode var_int (64 bit)     1.01   645.3±27.66µs        ? ?/sec    1.00   638.8±23.62µs        ? ?/sec
codec/jwst encode var_uint (32 bit)    1.00   421.9±12.06µs        ? ?/sec    1.00   422.0±14.08µs        ? ?/sec
codec/jwst encode var_uint (64 bit)    1.02   427.6±17.88µs        ? ?/sec    1.00   419.2±15.31µs        ? ?/sec
codec/lib0 decode var_int (64 bit)     1.01   525.4±22.04µs        ? ?/sec    1.00   519.8±19.16µs        ? ?/sec
codec/lib0 decode var_uint (32 bit)    1.00   291.5±12.60µs        ? ?/sec    1.00   290.8±10.32µs        ? ?/sec
codec/lib0 decode var_uint (64 bit)    1.01   294.2±11.64µs        ? ?/sec    1.00   292.3±10.25µs        ? ?/sec
codec/lib0 encode var_int (64 bit)     1.00   685.6±33.62µs        ? ?/sec    1.00   687.6±26.19µs        ? ?/sec
codec/lib0 encode var_uint (32 bit)    1.04   476.5±18.57µs        ? ?/sec    1.00   459.1±16.41µs        ? ?/sec
codec/lib0 encode var_uint (64 bit)    1.00   494.2±15.96µs        ? ?/sec    1.04   512.0±21.02µs        ? ?/sec
ops/array/jwst/insert                  1.00   483.7±13.49µs        ? ?/sec    1.02   493.9±15.40µs        ? ?/sec
ops/array/jwst/insert range            1.00   803.2±19.60µs        ? ?/sec    1.01   808.0±27.17µs        ? ?/sec
ops/array/jwst/remove                  1.00    231.8±6.69µs        ? ?/sec    1.02    237.1±9.28µs        ? ?/sec
ops/array/yrs/insert                   1.00    128.7±3.33µs        ? ?/sec    1.02   131.6±10.48µs        ? ?/sec
ops/array/yrs/insert range             1.00    179.9±4.70µs        ? ?/sec    1.00    180.2±5.02µs        ? ?/sec
ops/array/yrs/remove                   1.00    190.4±6.32µs        ? ?/sec    1.00    191.1±5.42µs        ? ?/sec
ops/text/jwst/insert                   1.00    312.1±7.83µs        ? ?/sec    1.01   315.4±13.08µs        ? ?/sec
ops/text/jwst/remove                   1.00      4.3±0.19µs        ? ?/sec    1.00      4.3±0.13µs        ? ?/sec
ops/text/yrs/insert                    1.00     55.1±1.67µs        ? ?/sec    1.00     54.9±1.57µs        ? ?/sec
ops/text/yrs/remove                    1.03      4.7±0.15µs        ? ?/sec    1.00      4.6±0.12µs        ? ?/sec
update/parse with jwst/basic.bin       1.00    113.3±2.69µs    48.2 MB/sec    1.03    116.4±2.83µs    46.9 MB/sec
update/parse with jwst/database.bin    1.01     92.5±2.03µs    35.8 MB/sec    1.00     92.0±2.86µs    36.0 MB/sec
update/parse with jwst/large.bin       1.00      5.9±0.22ms    38.9 MB/sec    1.01      5.9±0.27ms    38.5 MB/sec
update/parse with yrs/basic.bin        1.00     81.9±2.49µs    66.7 MB/sec    1.02     83.7±2.50µs    65.2 MB/sec
update/parse with yrs/database.bin     1.00     62.3±1.49µs    53.2 MB/sec    1.05     65.2±1.43µs    50.8 MB/sec
update/parse with yrs/large.bin        1.00      3.8±0.16ms    60.4 MB/sec    1.02      3.8±0.14ms    59.4 MB/sec