Really fix usernames cache hit events

This commit is contained in:
ErickSkrauch 2020-04-30 00:44:31 +03:00
parent c4566a337b
commit 2ea094bbf6
2 changed files with 4 additions and 4 deletions

View File

@ -40,9 +40,9 @@ func (s *StatsReporter) ConfigureWithDispatcher(d Subscriber) {
} }
if uuid == "" { if uuid == "" {
s.IncCounter("mojang_textures:usernames:cache_hit_nil", 1) s.IncCounter("mojang_textures.usernames.cache_hit_nil", 1)
} else { } else {
s.IncCounter("mojang_textures:usernames:cache_hit", 1) s.IncCounter("mojang_textures.usernames.cache_hit", 1)
} }
}) })
d.Subscribe("mojang_textures:textures:after_cache", func(uuid string, textures *mojang.SignedTexturesResponse, err error) { d.Subscribe("mojang_textures:textures:after_cache", func(uuid string, textures *mojang.SignedTexturesResponse, err error) {

View File

@ -228,7 +228,7 @@ var statsReporterTestCases = []*StatsReporterTestCase{
{"mojang_textures:usernames:after_cache", "username", "", true, nil}, {"mojang_textures:usernames:after_cache", "username", "", true, nil},
}, },
ExpectedCalls: [][]interface{}{ ExpectedCalls: [][]interface{}{
{"IncCounter", "mojang_textures:usernames:cache_hit_nil", int64(1)}, {"IncCounter", "mojang_textures.usernames.cache_hit_nil", int64(1)},
}, },
}, },
{ {
@ -236,7 +236,7 @@ var statsReporterTestCases = []*StatsReporterTestCase{
{"mojang_textures:usernames:after_cache", "username", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", true, nil}, {"mojang_textures:usernames:after_cache", "username", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", true, nil},
}, },
ExpectedCalls: [][]interface{}{ ExpectedCalls: [][]interface{}{
{"IncCounter", "mojang_textures:usernames:cache_hit", int64(1)}, {"IncCounter", "mojang_textures.usernames.cache_hit", int64(1)},
}, },
}, },
{ {