Kong / ngx_wasm_module

Nginx + WebAssembly
Apache License 2.0
79 stars 7 forks source link

feat(ffi) expose kv & metrics shms through FFI #582

Open casimiro opened 1 month ago

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 76.79558% with 84 lines in your changes missing coverage. Please review.

Project coverage is 62.97581%. Comparing base (96b4e27) to head (12dd92b). Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
src/common/proxy_wasm/ngx_proxy_wasm_host.c 42.85714% 28 Missing :warning:
src/common/shm/ngx_wa_shm_kv.c 71.64179% 19 Missing :warning:
src/common/shm/ngx_wa_shm_queue.c 26.92308% 19 Missing :warning:
src/common/metrics/ngx_wa_metrics.c 76.08696% 11 Missing :warning:
src/common/metrics/ngx_wa_histogram.c 68.42105% 6 Missing :warning:
src/common/shm/ngx_wa_shm.c 96.42857% 1 Missing :warning:

:exclamation: There is a different number of reports uploaded between BASE (96b4e27) and HEAD (12dd92b). Click for more details.

HEAD has 14 uploads less than BASE | Flag | BASE (96b4e27) | HEAD (12dd92b) | |------|------|------| |valgrind|5|1| |unit|10|0|
Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/Kong/ngx_wasm_module/pull/582/graphs/tree.svg?width=650&height=150&src=pr&token=T0PT2Q9IAN&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kong)](https://app.codecov.io/gh/Kong/ngx_wasm_module/pull/582?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kong) ```diff @@ Coverage Diff @@ ## main #582 +/- ## ==================================================== - Coverage 90.60900% 62.97581% -27.63319% ==================================================== Files 49 49 Lines 10936 9510 -1426 ==================================================== - Hits 9909 5989 -3920 - Misses 1027 3521 +2494 ``` | [Files with missing lines](https://app.codecov.io/gh/Kong/ngx_wasm_module/pull/582?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kong) | Coverage Δ | | |---|---|---| | [src/common/lua/ngx\_wasm\_lua\_ffi.c](https://app.codecov.io/gh/Kong/ngx_wasm_module/pull/582?src=pr&el=tree&filepath=src%2Fcommon%2Flua%2Fngx_wasm_lua_ffi.c&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kong#diff-c3JjL2NvbW1vbi9sdWEvbmd4X3dhc21fbHVhX2ZmaS5j) | `94.05405% <100.00000%> (+1.13370%)` | :arrow_up: | | [src/common/lua/ngx\_wasm\_lua\_ffi.h](https://app.codecov.io/gh/Kong/ngx_wasm_module/pull/582?src=pr&el=tree&filepath=src%2Fcommon%2Flua%2Fngx_wasm_lua_ffi.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kong#diff-c3JjL2NvbW1vbi9sdWEvbmd4X3dhc21fbHVhX2ZmaS5o) | `100.00000% <100.00000%> (ø)` | | | [src/common/metrics/ngx\_wa\_metrics.h](https://app.codecov.io/gh/Kong/ngx_wasm_module/pull/582?src=pr&el=tree&filepath=src%2Fcommon%2Fmetrics%2Fngx_wa_metrics.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kong#diff-c3JjL2NvbW1vbi9tZXRyaWNzL25neF93YV9tZXRyaWNzLmg=) | `100.00000% <100.00000%> (ø)` | | | [src/common/shm/ngx\_wa\_shm.h](https://app.codecov.io/gh/Kong/ngx_wasm_module/pull/582?src=pr&el=tree&filepath=src%2Fcommon%2Fshm%2Fngx_wa_shm.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kong#diff-c3JjL2NvbW1vbi9zaG0vbmd4X3dhX3NobS5o) | `100.00000% <100.00000%> (ø)` | | | [src/ngx\_wasmx.c](https://app.codecov.io/gh/Kong/ngx_wasm_module/pull/582?src=pr&el=tree&filepath=src%2Fngx_wasmx.c&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kong#diff-c3JjL25neF93YXNteC5j) | `82.78689% <100.00000%> (-6.60706%)` | :arrow_down: | | [src/wasm/ngx\_wasm.h](https://app.codecov.io/gh/Kong/ngx_wasm_module/pull/582?src=pr&el=tree&filepath=src%2Fwasm%2Fngx_wasm.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kong#diff-c3JjL3dhc20vbmd4X3dhc20uaA==) | `90.90909% <ø> (-9.09091%)` | :arrow_down: | | [src/wasm/ngx\_wasm\_core\_module.c](https://app.codecov.io/gh/Kong/ngx_wasm_module/pull/582?src=pr&el=tree&filepath=src%2Fwasm%2Fngx_wasm_core_module.c&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kong#diff-c3JjL3dhc20vbmd4X3dhc21fY29yZV9tb2R1bGUuYw==) | `97.14286% <ø> (+4.49580%)` | :arrow_up: | | [src/wasm/ngx\_wasm\_directives.c](https://app.codecov.io/gh/Kong/ngx_wasm_module/pull/582?src=pr&el=tree&filepath=src%2Fwasm%2Fngx_wasm_directives.c&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kong#diff-c3JjL3dhc20vbmd4X3dhc21fZGlyZWN0aXZlcy5j) | `35.08772% <100.00000%> (-61.42970%)` | :arrow_down: | | [src/common/shm/ngx\_wa\_shm.c](https://app.codecov.io/gh/Kong/ngx_wasm_module/pull/582?src=pr&el=tree&filepath=src%2Fcommon%2Fshm%2Fngx_wa_shm.c&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kong#diff-c3JjL2NvbW1vbi9zaG0vbmd4X3dhX3NobS5j) | `95.83333% <96.42857%> (ø)` | | | [src/common/metrics/ngx\_wa\_histogram.c](https://app.codecov.io/gh/Kong/ngx_wasm_module/pull/582?src=pr&el=tree&filepath=src%2Fcommon%2Fmetrics%2Fngx_wa_histogram.c&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kong#diff-c3JjL2NvbW1vbi9tZXRyaWNzL25neF93YV9oaXN0b2dyYW0uYw==) | `67.30769% <68.42105%> (-31.78323%)` | :arrow_down: | | ... and [4 more](https://app.codecov.io/gh/Kong/ngx_wasm_module/pull/582?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kong) | | ... and [37 files with indirect coverage changes](https://app.codecov.io/gh/Kong/ngx_wasm_module/pull/582/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kong) | [Flag](https://app.codecov.io/gh/Kong/ngx_wasm_module/pull/582/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kong) | Coverage Δ | | |---|---|---| | [unit](https://app.codecov.io/gh/Kong/ngx_wasm_module/pull/582/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kong) | `?` | | | [valgrind](https://app.codecov.io/gh/Kong/ngx_wasm_module/pull/582/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kong) | `62.97581% <76.79558%> (-19.08449%)` | :arrow_down: | 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=Kong#carryforward-flags-in-the-pull-request-comment) to find out more.