Apply suggestions from code review

Co-authored-by: Matt Keeler <mkeeler@users.noreply.github.com>
This commit is contained in:
Connor 2021-09-21 10:52:46 -05:00 committed by GitHub
parent ae3457b96a
commit 1ddee0680c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -48,7 +48,7 @@ func TestStateStore_Usage_NodeUsage_Delete(t *testing.T) {
func TestStateStore_Usage_KVUsage(t *testing.T) { func TestStateStore_Usage_KVUsage(t *testing.T) {
s := testStateStore(t) s := testStateStore(t)
// No nodes have been registered, and thus no usage entry exists // No keys have been registered, and thus no usage entry exists
idx, usage, err := s.KVUsage() idx, usage, err := s.KVUsage()
require.NoError(t, err) require.NoError(t, err)
require.Equal(t, idx, uint64(0)) require.Equal(t, idx, uint64(0))

View File

@ -149,7 +149,7 @@ func (u *UsageMetricsReporter) Run(ctx context.Context) {
} }
func (u *UsageMetricsReporter) runOnce() { func (u *UsageMetricsReporter) runOnce() {
u.logger.Debug("Starting usage run") u.logger.Trace("Starting usage run")
state := u.stateProvider.State() state := u.stateProvider.State()
_, nodeUsage, err := state.NodeUsage() _, nodeUsage, err := state.NodeUsage()
@ -171,7 +171,7 @@ func (u *UsageMetricsReporter) runOnce() {
_, kvUsage, err := state.KVUsage() _, kvUsage, err := state.KVUsage()
if err != nil { if err != nil {
u.logger.Warn("failed to retrieve kv entries from state store", "error", err) u.logger.Warn("failed to retrieve kv entry usage from state store", "error", err)
} }
u.emitKVUsage(kvUsage) u.emitKVUsage(kvUsage)