Skip to content

Commit

Permalink
reduce parameter size
Browse files Browse the repository at this point in the history
  • Loading branch information
tharun0064 committed Feb 5, 2025
1 parent 831c78c commit 75113bd
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/query-performance-monitoring/query_performance_main.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,16 @@ func QueryPerformanceMain(args args.ArgumentList, pgIntegration *integration.Int
return
}
cp := common_parameters.SetCommonParameters(args, versionInt, commonutils.GetDatabaseListInString(databaseMap))

populateQueryPerformanceMetrics(newConnection, pgIntegration, cp, connectionInfo)
}

func populateQueryPerformanceMetrics(newConnection *performancedbconnection.PGSQLConnection, pgIntegration *integration.Integration, cp *common_parameters.CommonParameters, connectionInfo performancedbconnection.Info) {
enabledExtensions, err := validations.FetchAllExtensions(newConnection)
if err != nil {
log.Error("Error fetching extensions: ", err)
return
}
populateQueryPerformanceMetrics(newConnection, pgIntegration, cp, connectionInfo, enabledExtensions)
}

func populateQueryPerformanceMetrics(newConnection *performancedbconnection.PGSQLConnection, pgIntegration *integration.Integration, cp *common_parameters.CommonParameters, connectionInfo performancedbconnection.Info, enabledExtensions map[string]bool) {
start := time.Now()
log.Debug("Starting PopulateSlowRunningMetrics at ", start)
slowRunningQueries := performancemetrics.PopulateSlowRunningMetrics(newConnection, pgIntegration, cp, enabledExtensions)
Expand Down

0 comments on commit 75113bd

Please sign in to comment.