Skip to content

Commit 9781f9c

Browse files
committed
sqlstats: rename sslocal.New to NewSQLStats
Epic: None Release note: None
1 parent 0e9251d commit 9781f9c

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

pkg/sql/conn_executor.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ func NewServer(cfg *ExecutorConfig, pool *mon.BytesMonitor) *Server {
438438
metrics := makeMetrics(false /* internal */, &cfg.Settings.SV)
439439
serverMetrics := makeServerMetrics(cfg)
440440
insightsProvider := insights.New(cfg.Settings, serverMetrics.InsightsMetrics)
441-
reportedSQLStats := sslocal.New(
441+
reportedSQLStats := sslocal.NewSQLStats(
442442
cfg.Settings,
443443
sqlstats.MaxMemReportedSQLStatsStmtFingerprints,
444444
sqlstats.MaxMemReportedSQLStatsTxnFingerprints,
@@ -448,7 +448,7 @@ func NewServer(cfg *ExecutorConfig, pool *mon.BytesMonitor) *Server {
448448
nil, /* reportedProvider */
449449
cfg.SQLStatsTestingKnobs,
450450
)
451-
memSQLStats := sslocal.New(
451+
memSQLStats := sslocal.NewSQLStats(
452452
cfg.Settings,
453453
sqlstats.MaxMemSQLStatsStmtFingerprints,
454454
sqlstats.MaxMemSQLStatsTxnFingerprints,

pkg/sql/sqlstats/sslocal/sql_stats_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ func TestExplicitTxnFingerprintAccounting(t *testing.T) {
452452
Settings: st,
453453
})
454454

455-
sqlStats := sslocal.New(
455+
sqlStats := sslocal.NewSQLStats(
456456
st,
457457
sqlstats.MaxMemSQLStatsStmtFingerprints,
458458
sqlstats.MaxMemSQLStatsTxnFingerprints,
@@ -583,7 +583,7 @@ func TestAssociatingStmtStatsWithTxnFingerprint(t *testing.T) {
583583
require.NoError(t, err)
584584

585585
// Construct the SQL Stats machinery.
586-
sqlStats := sslocal.New(
586+
sqlStats := sslocal.NewSQLStats(
587587
st,
588588
sqlstats.MaxMemSQLStatsStmtFingerprints,
589589
sqlstats.MaxMemSQLStatsTxnFingerprints,
@@ -2071,7 +2071,7 @@ func createNewSqlStats() *sslocal.SQLStats {
20712071
})
20722072
sqlstats.MaxMemSQLStatsStmtFingerprints.Override(context.Background(), &st.SV, 100000)
20732073
sqlstats.MaxMemSQLStatsTxnFingerprints.Override(context.Background(), &st.SV, 100000)
2074-
sqlStats := sslocal.New(
2074+
sqlStats := sslocal.NewSQLStats(
20752075
st,
20762076
sqlstats.MaxMemSQLStatsStmtFingerprints,
20772077
sqlstats.MaxMemSQLStatsTxnFingerprints,

pkg/sql/sqlstats/sslocal/sslocal_provider.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ import (
2323
"github.com/cockroachdb/errors"
2424
)
2525

26-
// New returns an instance of SQLStats.
27-
func New(
26+
// NewSQLStats returns an instance of SQLStats.
27+
func NewSQLStats(
2828
settings *cluster.Settings,
2929
maxStmtFingerprints *settings.IntSetting,
3030
maxTxnFingerprints *settings.IntSetting,

0 commit comments

Comments
 (0)