danielealbano / cachegrand

cachegrand - a modern data ingestion, processing and serving platform built for today's hardware
BSD 3-Clause "New" or "Revised" License
975 stars 34 forks source link

Add support for program ctor & dtor callbacks in modules #379

Closed danielealbano closed 1 year ago

danielealbano commented 1 year ago

This PR implements a set of callbacks for the modules invoked at the beginning, before the workers start, and at the end, right after the workers are terminated.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 19.05% and project coverage change: -0.18 :warning:

Comparison is base (7bb9168) 78.45% compared to head (829362a) 78.28%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #379 +/- ## ========================================== - Coverage 78.45% 78.28% -0.18% ========================================== Files 187 187 Lines 12996 13014 +18 ========================================== - Hits 10196 10187 -9 - Misses 2800 2827 +27 ``` | Flag | Coverage Δ | | |---|---|---| | unittests | `78.28% <19.05%> (-0.18%)` | :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=Daniele+Salvatore+Albano#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://codecov.io/gh/danielealbano/cachegrand/pull/379?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano) | Coverage Δ | | |---|---|---| | [src/module/module.c](https://codecov.io/gh/danielealbano/cachegrand/pull/379?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano#diff-c3JjL21vZHVsZS9tb2R1bGUuYw==) | `93.75% <ø> (ø)` | | | [src/module/module.h](https://codecov.io/gh/danielealbano/cachegrand/pull/379?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano#diff-c3JjL21vZHVsZS9tb2R1bGUuaA==) | `66.67% <ø> (ø)` | | | [src/module/prometheus/module\_prometheus.c](https://codecov.io/gh/danielealbano/cachegrand/pull/379?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano#diff-c3JjL21vZHVsZS9wcm9tZXRoZXVzL21vZHVsZV9wcm9tZXRoZXVzLmM=) | `91.73% <ø> (ø)` | | | [src/program.c](https://codecov.io/gh/danielealbano/cachegrand/pull/379?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano#diff-c3JjL3Byb2dyYW0uYw==) | `38.32% <5.56%> (-1.68%)` | :arrow_down: | | [src/module/redis/module\_redis.c](https://codecov.io/gh/danielealbano/cachegrand/pull/379?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano#diff-c3JjL21vZHVsZS9yZWRpcy9tb2R1bGVfcmVkaXMuYw==) | `83.33% <100.00%> (ø)` | | | [src/worker/worker.c](https://codecov.io/gh/danielealbano/cachegrand/pull/379?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano#diff-c3JjL3dvcmtlci93b3JrZXIuYw==) | `82.97% <100.00%> (ø)` | | ... and [2 files with indirect coverage changes](https://codecov.io/gh/danielealbano/cachegrand/pull/379/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.