mirror of
https://github.com/elyby/chrly.git
synced 2024-12-22 13:09:53 +05:30
Really fix usernames cache hit events
This commit is contained in:
parent
c4566a337b
commit
2ea094bbf6
@ -40,9 +40,9 @@ func (s *StatsReporter) ConfigureWithDispatcher(d Subscriber) {
|
||||
}
|
||||
|
||||
if uuid == "" {
|
||||
s.IncCounter("mojang_textures:usernames:cache_hit_nil", 1)
|
||||
s.IncCounter("mojang_textures.usernames.cache_hit_nil", 1)
|
||||
} 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) {
|
||||
|
@ -228,7 +228,7 @@ var statsReporterTestCases = []*StatsReporterTestCase{
|
||||
{"mojang_textures:usernames:after_cache", "username", "", true, nil},
|
||||
},
|
||||
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},
|
||||
},
|
||||
ExpectedCalls: [][]interface{}{
|
||||
{"IncCounter", "mojang_textures:usernames:cache_hit", int64(1)},
|
||||
{"IncCounter", "mojang_textures.usernames.cache_hit", int64(1)},
|
||||
},
|
||||
},
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user