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 prometheus stats per worker #269

Closed danielealbano closed 1 year ago

danielealbano commented 1 year ago

To properly analyze and investigate the load the prometheus module now expose all the standard metrics per worker, not only the aggregated ones.

To differenciate between the metrics per worker and the aggregated ones a tag is added per metric to indicate the worker index which is set to "aggregated" for the aggregated metrics.

This change breaks compatibility with the previous behaviour and not filtering on the aggregated stats will cause to any software reading the prometheus metrics to provide incorrect values. The new setups should take this into account as well.

codecov[bot] commented 1 year ago

Codecov Report

Base: 82.93% // Head: 82.93% // Increases project coverage by +0.00% :tada:

Coverage data is based on head (7e2d2d9) compared to base (7727913). Patch coverage: 97.01% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #269 +/- ## ======================================= Coverage 82.93% 82.93% ======================================= Files 158 158 Lines 10251 10271 +20 ======================================= + Hits 8501 8518 +17 - Misses 1750 1753 +3 ``` | Flag | Coverage Δ | | |---|---|---| | unittests | `82.93% <97.01%> (+<0.01%)` | :arrow_up: | 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/269?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/prometheus/module\_prometheus.c](https://codecov.io/gh/danielealbano/cachegrand/pull/269?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.70% <96.08%> (+0.03%)` | :arrow_up: | | [src/network/network.c](https://codecov.io/gh/danielealbano/cachegrand/pull/269?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano#diff-c3JjL25ldHdvcmsvbmV0d29yay5j) | `83.57% <100.00%> (ø)` | | | [src/storage/storage.c](https://codecov.io/gh/danielealbano/cachegrand/pull/269?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano#diff-c3JjL3N0b3JhZ2Uvc3RvcmFnZS5j) | `93.94% <100.00%> (ø)` | | | [src/worker/network/worker\_network\_iouring\_op.c](https://codecov.io/gh/danielealbano/cachegrand/pull/269?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano#diff-c3JjL3dvcmtlci9uZXR3b3JrL3dvcmtlcl9uZXR3b3JrX2lvdXJpbmdfb3AuYw==) | `64.50% <100.00%> (ø)` | | | [src/worker/network/worker\_network\_op.c](https://codecov.io/gh/danielealbano/cachegrand/pull/269?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano#diff-c3JjL3dvcmtlci9uZXR3b3JrL3dvcmtlcl9uZXR3b3JrX29wLmM=) | `71.15% <100.00%> (ø)` | | | [src/worker/worker\_stats.c](https://codecov.io/gh/danielealbano/cachegrand/pull/269?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano#diff-c3JjL3dvcmtlci93b3JrZXJfc3RhdHMuYw==) | `95.96% <100.00%> (-4.04%)` | :arrow_down: | | [...rc/data\_structures/hashtable\_mpmc/hashtable\_mpmc.c](https://codecov.io/gh/danielealbano/cachegrand/pull/269?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano#diff-c3JjL2RhdGFfc3RydWN0dXJlcy9oYXNodGFibGVfbXBtYy9oYXNodGFibGVfbXBtYy5j) | `95.96% <0.00%> (+0.45%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Daniele+Salvatore+Albano)

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