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

feat: add node binding for y-octo #4

Closed darkskygit closed 1 year ago

darkskygit commented 1 year ago

this pr aims to add node binding & testing workflow the impl and test case will be carried out in the next pr

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 25.45% and project coverage change: -2.17% :warning:

Comparison is base (57286a3) 79.66% compared to head (e45e0a7) 77.50%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #4 +/- ## ========================================== - Coverage 79.66% 77.50% -2.17% ========================================== Files 44 46 +2 Lines 6481 6756 +275 ========================================== + Hits 5163 5236 +73 - Misses 1318 1520 +202 ``` | [Flag](https://app.codecov.io/gh/toeverything/y-octo/pull/4/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toeverything) | Coverage Δ | | |---|---|---| | [node-binding-test](https://app.codecov.io/gh/toeverything/y-octo/pull/4/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toeverything) | `22.17% <22.17%> (?)` | | 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=toeverything#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files Changed](https://app.codecov.io/gh/toeverything/y-octo/pull/4?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toeverything) | Coverage Δ | | |---|---|---| | [y-octo-node/index.js](https://app.codecov.io/gh/toeverything/y-octo/pull/4?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toeverything#diff-eS1vY3RvLW5vZGUvaW5kZXguanM=) | `22.17% <22.17%> (ø)` | | | [y-octo-node/src/doc.rs](https://app.codecov.io/gh/toeverything/y-octo/pull/4?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toeverything#diff-eS1vY3RvLW5vZGUvc3JjL2RvYy5ycw==) | `72.22% <72.22%> (ø)` | | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/toeverything/y-octo/pull/4/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.

github-actions[bot] commented 1 year ago

Benchmark Results

Linux

group                                     main                                   pr
-----                                     ----                                   --
codec/jwst decode var_int (32 bit)        1.00    328.7±0.10µs        ? ?/sec    1.00    328.6±0.14µs        ? ?/sec
codec/jwst decode var_uint (32 bit)       1.00    385.0±0.17µs        ? ?/sec    1.00    385.0±0.20µs        ? ?/sec
codec/jwst decode var_uint (64 bit)       1.00    288.9±0.06µs        ? ?/sec    1.00    288.9±0.10µs        ? ?/sec
codec/jwst encode var_int (32 bit)        1.00    516.2±1.80µs        ? ?/sec    1.00    515.7±1.98µs        ? ?/sec
codec/jwst encode var_uint (32 bit)       1.00    314.7±0.47µs        ? ?/sec    1.00    314.4±0.46µs        ? ?/sec
codec/jwst encode var_uint (64 bit)       1.00    314.5±0.49µs        ? ?/sec    1.00    314.4±0.50µs        ? ?/sec
codec/lib0 decode var_int (64 bit)        1.00    393.4±0.51µs        ? ?/sec    1.00    393.3±0.13µs        ? ?/sec
codec/lib0 decode var_uint (32 bit)       1.00    262.3±0.42µs        ? ?/sec    1.00    262.2±0.09µs        ? ?/sec
codec/lib0 decode var_uint (64 bit)       1.00    240.9±1.14µs        ? ?/sec    1.00    240.8±0.08µs        ? ?/sec
codec/lib0 encode var_int (64 bit)        1.00    441.7±5.57µs        ? ?/sec    1.00    440.6±4.37µs        ? ?/sec
codec/lib0 encode var_uint (32 bit)       1.00    385.7±0.26µs        ? ?/sec    1.00    385.4±0.36µs        ? ?/sec
codec/lib0 encode var_uint (64 bit)       1.00    348.2±0.13µs        ? ?/sec    1.00    348.2±0.06µs        ? ?/sec
ops/array/jwst/insert                     1.00    375.5±0.59µs        ? ?/sec    1.00    376.6±0.45µs        ? ?/sec
ops/array/jwst/insert range               1.00    515.2±0.54µs        ? ?/sec    1.00    515.9±0.40µs        ? ?/sec
ops/array/jwst/remove                     1.00    256.7±0.35µs        ? ?/sec    1.00    257.0±0.57µs        ? ?/sec
ops/array/yrs/insert                      1.00     86.9±0.18µs        ? ?/sec    1.04     90.0±0.08µs        ? ?/sec
ops/array/yrs/insert range                1.01    114.4±0.78µs        ? ?/sec    1.00    113.0±0.21µs        ? ?/sec
ops/array/yrs/remove                      1.02    103.2±0.29µs        ? ?/sec    1.00    100.9±0.16µs        ? ?/sec
ops/text/jwst/insert                      1.00    155.7±0.45µs        ? ?/sec    1.00    155.3±0.20µs        ? ?/sec
ops/text/jwst/remove                      1.02      3.0±0.00µs        ? ?/sec    1.00      2.9±0.00µs        ? ?/sec
ops/text/yrs/insert                       1.00     43.9±0.04µs        ? ?/sec    1.00     43.8±0.07µs        ? ?/sec
ops/text/yrs/remove                       1.00      2.3±0.01µs        ? ?/sec    1.00      2.3±0.00µs        ? ?/sec
update/parse with jwst/basic.bin          1.00     67.4±0.03µs    81.0 MB/sec    1.01     68.3±0.17µs    79.9 MB/sec
update/parse with jwst/database.bin       1.00     54.3±0.10µs    61.0 MB/sec    1.01     54.7±0.05µs    60.6 MB/sec
update/parse with jwst/large.bin          1.01      5.1±0.02ms    44.7 MB/sec    1.00      5.1±0.02ms    45.0 MB/sec
update/parse with jwst/with-subdoc.bin    1.00      6.4±0.01µs   109.8 MB/sec    1.02      6.5±0.01µs   108.1 MB/sec
update/parse with yrs/basic.bin           1.00     44.3±0.06µs   123.2 MB/sec    1.00     44.2±0.05µs   123.5 MB/sec
update/parse with yrs/database.bin        1.00     35.7±0.06µs    92.9 MB/sec    1.01     35.9±0.02µs    92.2 MB/sec
update/parse with yrs/large.bin           1.01      3.3±0.01ms    69.9 MB/sec    1.00      3.2±0.02ms    70.9 MB/sec
update/parse with yrs/with-subdoc.bin     1.00      5.5±0.01µs   127.0 MB/sec    1.01      5.6±0.01µs   125.7 MB/sec

Windows

group                                     main                                   pr
-----                                     ----                                   --
codec/jwst decode var_int (32 bit)        1.00   453.1±22.78µs        ? ?/sec    1.00   454.4±23.15µs        ? ?/sec
codec/jwst decode var_uint (32 bit)       1.01   397.4±18.86µs        ? ?/sec    1.00   392.9±19.71µs        ? ?/sec
codec/jwst decode var_uint (64 bit)       1.02   403.6±17.49µs        ? ?/sec    1.00   395.0±17.79µs        ? ?/sec
codec/jwst encode var_int (32 bit)        1.00   529.8±28.74µs        ? ?/sec    1.02   540.3±31.10µs        ? ?/sec
codec/jwst encode var_uint (32 bit)       1.00   359.5±19.65µs        ? ?/sec    1.00   359.5±18.51µs        ? ?/sec
codec/jwst encode var_uint (64 bit)       1.00   369.2±18.98µs        ? ?/sec    1.00   367.9±19.83µs        ? ?/sec
codec/lib0 decode var_int (64 bit)        1.00   365.2±19.27µs        ? ?/sec    1.05   382.3±24.43µs        ? ?/sec
codec/lib0 decode var_uint (32 bit)       1.00   314.2±15.29µs        ? ?/sec    1.00   314.5±16.44µs        ? ?/sec
codec/lib0 decode var_uint (64 bit)       1.05   322.9±11.78µs        ? ?/sec    1.00   307.9±21.78µs        ? ?/sec
codec/lib0 encode var_int (64 bit)        1.03   532.5±29.59µs        ? ?/sec    1.00   518.0±28.59µs        ? ?/sec
codec/lib0 encode var_uint (32 bit)       1.00   379.9±21.26µs        ? ?/sec    1.00   378.4±22.16µs        ? ?/sec
codec/lib0 encode var_uint (64 bit)       1.02   373.0±20.70µs        ? ?/sec    1.00   365.5±17.33µs        ? ?/sec
ops/array/jwst/insert                     1.00   515.0±19.76µs        ? ?/sec    1.01   518.0±18.86µs        ? ?/sec
ops/array/jwst/insert range               1.00   679.3±28.26µs        ? ?/sec    1.04   704.4±27.06µs        ? ?/sec
ops/array/jwst/remove                     1.00   328.2±11.59µs        ? ?/sec    1.03   338.9±15.86µs        ? ?/sec
ops/array/yrs/insert                      1.00    139.8±5.92µs        ? ?/sec    1.00    139.1±7.17µs        ? ?/sec
ops/array/yrs/insert range                1.00    196.1±7.70µs        ? ?/sec    1.01    197.2±7.77µs        ? ?/sec
ops/array/yrs/remove                      1.00    204.5±8.27µs        ? ?/sec    1.00   204.9±11.39µs        ? ?/sec
ops/text/jwst/insert                      1.00   234.0±11.06µs        ? ?/sec    1.04   242.4±14.70µs        ? ?/sec
ops/text/jwst/remove                      1.00      5.7±0.29µs        ? ?/sec    1.02      5.8±0.31µs        ? ?/sec
ops/text/yrs/insert                       1.01     61.9±3.21µs        ? ?/sec    1.00     61.1±2.68µs        ? ?/sec
ops/text/yrs/remove                       1.00      5.8±0.26µs        ? ?/sec    1.00      5.8±0.35µs        ? ?/sec
update/parse with jwst/basic.bin          1.00    128.9±6.35µs    42.3 MB/sec    1.02    131.1±4.75µs    41.6 MB/sec
update/parse with jwst/database.bin       1.00     96.9±3.80µs    34.2 MB/sec    1.03    100.1±5.59µs    33.1 MB/sec
update/parse with jwst/large.bin          1.00      6.0±0.27ms    37.8 MB/sec    1.07      6.4±0.28ms    35.5 MB/sec
update/parse with jwst/with-subdoc.bin    1.01     19.0±0.70µs    36.9 MB/sec    1.00     18.8±0.80µs    37.2 MB/sec
update/parse with yrs/basic.bin           1.00     83.2±3.54µs    65.6 MB/sec    1.01     84.3±3.15µs    64.8 MB/sec
update/parse with yrs/database.bin        1.00     62.5±2.82µs    53.0 MB/sec    1.04     64.9±2.55µs    51.1 MB/sec
update/parse with yrs/large.bin           1.02      4.2±0.20ms    54.2 MB/sec    1.00      4.1±0.26ms    55.1 MB/sec
update/parse with yrs/with-subdoc.bin     1.01     14.7±1.08µs    47.7 MB/sec    1.00     14.5±0.58µs    48.3 MB/sec
github-advanced-security[bot] commented 1 year ago

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.