Skip to content

[8.0] [MOD-8039] Reorganize stats files#5351

Merged
meiravgri merged 1 commit into8.0from
backport-5329-to-8.0
Dec 16, 2024
Merged

[8.0] [MOD-8039] Reorganize stats files#5351
meiravgri merged 1 commit into8.0from
backport-5329-to-8.0

Conversation

@redisearch-backport-pull-request
Copy link
Contributor

Description

Backport of #5329 to 8.0.

* new file : info/INFO_MODULES

responsible to expose all aggregated shard stats to INFO command

move RS_moduleInfoFunc from module-init to

move all add to info functions to a dedicated file:

from global_stats.c
FieldsGlobalStats_AddToInfo
TotalGlobalStats_Queries_AddToInfo
DialectsGlobalStats_AddToInfo
IndexesGlobalStats_AddToInfo

from config.c:
RSConfig_AddToInfo

introduce FieldsGlobalStats_GetIndexError to expose fields errors
move queries stats from TotalGlobalStats to seperate struct QueriesGlobalStats

* rediSearchAPI::RediSearch_TotalInfo calls IndexesInfo_TotalInfo from indexes_info

IndexesInfo_TotalInfo (orignally  rediSearchAPI::RediSearch_TotalInfo) calls IndexSpec_TotalMemUsage instead of rediSearchAPI::RediSearch_TotalMemUsage

introduce indexes_info
rename TotalSpecsFieldInfo and  TotalSpecsInfo:
specs->indexes
move TotalIndexesFieldsInfo and TotalIndexesInfo from info_command to indexes_info

move global stats to info dir
move info_command to info dir

introduce util/units. A file for all macros handling shared units conversion
remove CLOCKS_PER_MILLISEC from profile.h, include util/units.h instead

add a cpp test for llapi indexes info

* release index
remove unused header from module-init

* remove TODO

* review fixes

rename INFO_MODULES->info_redis

rename MEMORY_HUMAN->MEMORY_MB

(cherry picked from commit 175d787)
@codecov
Copy link

codecov bot commented Dec 15, 2024

Codecov Report

Attention: Patch coverage is 98.51301% with 4 lines in your changes missing coverage. Please review.

Project coverage is 86.57%. Comparing base (69b7d7b) to head (3000c4b).

Files with missing lines Patch % Lines
src/info/info_redis.c 98.27% 3 Missing ⚠️
src/info/indexes_info.c 97.36% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              8.0    #5351      +/-   ##
==========================================
+ Coverage   86.55%   86.57%   +0.02%     
==========================================
  Files         192      194       +2     
  Lines       34467    34511      +44     
==========================================
+ Hits        29834    29879      +45     
+ Misses       4633     4632       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@meiravgri meiravgri added this pull request to the merge queue Dec 16, 2024
Merged via the queue into 8.0 with commit 2482192 Dec 16, 2024
@meiravgri meiravgri deleted the backport-5329-to-8.0 branch December 16, 2024 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant