提交 e0b6599a 编写于 作者: C chris-sun-star

fix resource problem, delete GO_RACE_FLAG when compile, set GCPercent to 500

上级 81ad06b7
...@@ -11,7 +11,6 @@ GOCOVERAGE_FILE := tests/coverage.out ...@@ -11,7 +11,6 @@ GOCOVERAGE_FILE := tests/coverage.out
GOCOVERAGE_REPORT := tests/coverage-report GOCOVERAGE_REPORT := tests/coverage-report
GOTEST := OB_AGENT_CONFIG_PATH=$(PWD) $(GO) test -tags test -covermode=count -coverprofile=$(GOCOVERAGE_FILE) -p $(PROCESSOR) GOTEST := OB_AGENT_CONFIG_PATH=$(PWD) $(GO) test -tags test -covermode=count -coverprofile=$(GOCOVERAGE_FILE) -p $(PROCESSOR)
GO_RACE_FLAG =-race
LDFLAGS += -X "github.com/oceanbase/obagent/config.AgentVersion=${VERSION}" LDFLAGS += -X "github.com/oceanbase/obagent/config.AgentVersion=${VERSION}"
#LDFLAGS += -X "github.com/oceanbase/obagent/config.ReleaseVersion=$(shell git describe --tags --dirty --always)" #LDFLAGS += -X "github.com/oceanbase/obagent/config.ReleaseVersion=$(shell git describe --tags --dirty --always)"
LDFLAGS += -X "github.com/oceanbase/obagent/config.BuildTimestamp=$(shell date -u '+%Y-%m-%d %H:%M:%S')" LDFLAGS += -X "github.com/oceanbase/obagent/config.BuildTimestamp=$(shell date -u '+%Y-%m-%d %H:%M:%S')"
......
...@@ -17,6 +17,8 @@ import ( ...@@ -17,6 +17,8 @@ import (
"os" "os"
"time" "time"
"runtime/debug"
"github.com/pkg/errors" "github.com/pkg/errors"
log "github.com/sirupsen/logrus" log "github.com/sirupsen/logrus"
"github.com/spf13/cobra" "github.com/spf13/cobra"
...@@ -48,6 +50,8 @@ var ( ...@@ -48,6 +50,8 @@ var (
) )
func init() { func init() {
debug.SetGCPercent(config.GCPercent)
// monagent server config file // monagent server config file
monagentCommand.PersistentFlags().StringP("config", "c", "conf/monagent.yaml", "config file") monagentCommand.PersistentFlags().StringP("config", "c", "conf/monagent.yaml", "config file")
// plugins config use dir, all yaml files in the dir will be used as plugin config file // plugins config use dir, all yaml files in the dir will be used as plugin config file
......
...@@ -28,6 +28,7 @@ type Process = string ...@@ -28,6 +28,7 @@ type Process = string
const ( const (
ProcessMonitorAgent Process = "monagent" ProcessMonitorAgent Process = "monagent"
GCPercent int = 500
) )
type InstallConfig struct { type InstallConfig struct {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册