From d962876974d1d1f1e84fa8f2c2e615d91ed09a50 Mon Sep 17 00:00:00 2001 From: Mihir Gandhi Date: Mon, 15 Jul 2024 19:52:32 +0530 Subject: [PATCH] chore: update default mtu config (#4890) * chore: update default mtu config * addressed comments --- enterprise/trackedusers/users_reporter.go | 6 ++++-- enterprise/trackedusers/users_reporter_test.go | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/enterprise/trackedusers/users_reporter.go b/enterprise/trackedusers/users_reporter.go index 703c894419..5292882b97 100644 --- a/enterprise/trackedusers/users_reporter.go +++ b/enterprise/trackedusers/users_reporter.go @@ -7,6 +7,8 @@ import ( "fmt" "time" + "github.com/rudderlabs/rudder-server/utils/timeutil" + "github.com/rudderlabs/rudder-go-kit/stats" "github.com/rudderlabs/rudder-server/jobsdb" @@ -62,7 +64,7 @@ func NewUniqueUsersReporter(log logger.Logger, conf *config.Config, stats stats. return &UniqueUsersReporter{ log: log, hllSettings: &hll.Settings{ - Log2m: conf.GetInt("TrackedUsers.precision", 14), + Log2m: conf.GetInt("TrackedUsers.precision", 16), Regwidth: conf.GetInt("TrackedUsers.registerWidth", 5), ExplicitThreshold: hll.AutoExplicitThreshold, SparseEnabled: true, @@ -70,7 +72,7 @@ func NewUniqueUsersReporter(log logger.Logger, conf *config.Config, stats stats. instanceID: config.GetString("INSTANCE_ID", "1"), stats: stats, now: func() time.Time { - return time.Now() + return timeutil.Now() }, }, nil } diff --git a/enterprise/trackedusers/users_reporter_test.go b/enterprise/trackedusers/users_reporter_test.go index 67100a2af2..7b76e4a17e 100644 --- a/enterprise/trackedusers/users_reporter_test.go +++ b/enterprise/trackedusers/users_reporter_test.go @@ -29,7 +29,7 @@ import ( ) var ( - hllSettings = hll.Settings{Log2m: 14, Regwidth: 5, ExplicitThreshold: hll.AutoExplicitThreshold, SparseEnabled: true} + hllSettings = hll.Settings{Log2m: 16, Regwidth: 5, ExplicitThreshold: hll.AutoExplicitThreshold, SparseEnabled: true} sampleWorkspaceID = "workspaceID" sampleWorkspaceID2 = "workspaceID2" sampleSourceID = "sourceID"