From 2ea094bbf6a1a7a8e6c60e13dc009c4259d013be Mon Sep 17 00:00:00 2001 From: ErickSkrauch Date: Thu, 30 Apr 2020 00:44:31 +0300 Subject: [PATCH] Really fix usernames cache hit events --- eventsubscribers/stats_reporter.go | 4 ++-- eventsubscribers/stats_reporter_test.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/eventsubscribers/stats_reporter.go b/eventsubscribers/stats_reporter.go index 5216676..926b1c0 100644 --- a/eventsubscribers/stats_reporter.go +++ b/eventsubscribers/stats_reporter.go @@ -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) { diff --git a/eventsubscribers/stats_reporter_test.go b/eventsubscribers/stats_reporter_test.go index 83eedf7..df6288e 100644 --- a/eventsubscribers/stats_reporter_test.go +++ b/eventsubscribers/stats_reporter_test.go @@ -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)}, }, }, {