Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update "Total" message and used_memory_human log information in serverCron() function #594

Merged
merged 7 commits into from
Aug 24, 2024

Conversation

Virusuki
Copy link
Contributor

@Virusuki Virusuki commented Jun 3, 2024

At the VERBOSE/DEBUG log level, which is output once every 5 seconds, added to show the "Total" message of all clients and to show memory usage (used_memory) with used_memory_human.
Also, it seems clearer to show "total" number of keys and the number of volatile in entire keys.

17237:M 03 Jun 2024 20:44:50.579 - Accepted 127.0.0.1:33506
17237:M 03 Jun 2024 20:44:52.973 . Total: 1 clients connected (0 replicas), 892.16K(913576 bytes) in use
17237:M 03 Jun 2024 20:44:58.000 - DB 0: Total 1 keys (0/1 volatile) in 4 slots HT.
17237:M 03 Jun 2024 20:44:58.000 . Total: 1 clients connected (0 replicas), 896.37K(917880 bytes) in use
17237:M 03 Jun 2024 20:45:03.026 - DB 0: Total 3 keys (0/3 volatile) in 4 slots HT.
17237:M 03 Jun 2024 20:45:03.026 . Total: 1 clients connected (0 replicas), 916.47K(938464 bytes) in use
17237:M 03 Jun 2024 20:45:08.134 - DB 0: Total 4 keys (0/4 volatile) in 4 slots HT.
17237:M 03 Jun 2024 20:45:08.134 . Total: 1 clients connected (0 replicas), 896.53K(918048 bytes) in use
17237:M 03 Jun 2024 20:45:13.162 - DB 0: Total 4 keys (1/4 volatile) in 4 slots HT.
17237:M 03 Jun 2024 20:45:13.162 . Total: 1 clients connected (0 replicas), 920.70K(942792 bytes) in use
17237:M 03 Jun 2024 20:45:18.199 - DB 0: Total 4 keys (2/4 volatile) in 4 slots HT.
17237:M 03 Jun 2024 20:45:18.199 . Total: 1 clients connected (0 replicas), 920.72K(942816 bytes) in use
17237:M 03 Jun 2024 20:45:23.218 - DB 0: Total 4 keys (2/4 volatile) in 4 slots HT.
17237:M 03 Jun 2024 20:45:23.218 . Total: 1 clients connected (0 replicas), 920.72K(942816 bytes) in use

Closes #643

Copy link

codecov bot commented Jun 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.59%. Comparing base (b48596a) to head (a9e8efe).
Report is 1 commits behind head on unstable.

Additional details and impacted files
@@            Coverage Diff            @@
##           unstable     #594   +/-   ##
=========================================
  Coverage     70.58%   70.59%           
=========================================
  Files           112      112           
  Lines         61528    61531    +3     
=========================================
+ Hits          43431    43436    +5     
+ Misses        18097    18095    -2     
Files Coverage Δ
src/server.c 88.57% <100.00%> (+0.01%) ⬆️
src/server.h 100.00% <ø> (ø)

... and 14 files with indirect coverage changes

@Virusuki Virusuki marked this pull request as draft June 10, 2024 01:34
@Virusuki Virusuki marked this pull request as ready for review June 10, 2024 01:34
Copy link
Member

@madolson madolson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, seems reasonable to me to improve the debug log line.

src/server.c Outdated Show resolved Hide resolved
src/server.c Outdated Show resolved Hide resolved
src/server.c Outdated Show resolved Hide resolved
Signed-off-by: NAM UK KIM <[email protected]>
@Virusuki Virusuki requested a review from madolson June 17, 2024 21:18
src/server.c Outdated Show resolved Hide resolved
Signed-off-by: NAM UK KIM <[email protected]>
@Virusuki
Copy link
Contributor Author

Virusuki commented Aug 3, 2024

@madolson please also take a look.

@Virusuki Virusuki requested a review from zvi-code August 8, 2024 04:02
src/server.c Outdated Show resolved Hide resolved
Signed-off-by: Madelyn Olson <[email protected]>
@madolson madolson merged commit 0053429 into valkey-io:unstable Aug 24, 2024
47 checks passed
madolson pushed a commit that referenced this pull request Sep 2, 2024
…rCron() function (#594)

At the VERBOSE/DEBUG log level, which is output once every 5 seconds,
added to show the "Total" message of all clients and to show memory
usage (used_memory) with used_memory_human.
Also, it seems clearer to show "total" number of keys and the number of
volatile in entire keys.

---------

Signed-off-by: NAM UK KIM <[email protected]>
madolson pushed a commit that referenced this pull request Sep 3, 2024
…rCron() function (#594)

At the VERBOSE/DEBUG log level, which is output once every 5 seconds,
added to show the "Total" message of all clients and to show memory
usage (used_memory) with used_memory_human.
Also, it seems clearer to show "total" number of keys and the number of
volatile in entire keys.

---------

Signed-off-by: NAM UK KIM <[email protected]>
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.

[NEW] Add "Total" message and used_memory_human log information in serverCron() function
4 participants