Skip to content

Commit

Permalink
clear
Browse files Browse the repository at this point in the history
  • Loading branch information
dup2X committed May 31, 2016
1 parent 8f09694 commit d2de020
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
3 changes: 3 additions & 0 deletions metrics/graphite.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ func newRoamClient(root string) *RoamClient {
}

func (m *RoamClient) Send(key string, data []byte) (err error) {
if len(data) == 0 || string(data) == "[]" {
return
}
sts, err := transToRoamStruct(data)
if err != nil {
log.Warnf("store profile log err : %v", err)
Expand Down
3 changes: 1 addition & 2 deletions metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@ func Init(cfg *config.Config) (err error) {
serviceName: "wqs",
endpoint: hn,
stop: make(chan struct{}),
//transport: newRoamClient(),
transport: newHTTPClient(),
transport: newRoamClient("127.0.0.1"),
}

sec, err := cfg.GetSection("metrics")
Expand Down
4 changes: 1 addition & 3 deletions metrics/term/dash.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ const (
)

type Dash struct {
dashboard bool
stat map[string]map[string]*Stat
lock *sync.RWMutex
s *httpServer
in chan *metrics.MetricsStat
view *termui.List
dashboard bool

gList []termui.Bufferer
hosts []string
Expand Down Expand Up @@ -182,7 +182,6 @@ func (d *Dash) Start() {
ls.BorderLabel = fmt.Sprintf("%s@%s", s, h)
ls.Height = d.height
ls.Width = d.width
// fmt.Printf("index=%d PL=%d d.width=%d d.height=%d row=%d\n", index, PL, d.width, d.height, row)
ls.X = (index % PL) * d.width
if index >= PL && index%PL == 0 {
newRow = true
Expand All @@ -191,7 +190,6 @@ func (d *Dash) Start() {
row++
}
ls.Y = d.height * row
// fmt.Printf("%+v\n", ls)
newRow = false
d.gList = append(d.gList, ls)
index++
Expand Down

0 comments on commit d2de020

Please sign in to comment.