Skip to content

Commit

Permalink
add forward work report counter
Browse files Browse the repository at this point in the history
  • Loading branch information
ngaut committed Apr 28, 2014
1 parent dba6891 commit 2e3a61a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ type Server struct {
startSessionId int64
opCounter map[uint32]int64
store storage.JobQueue
forwardReport int64
}

var ( //const replys, to avoid building it every time
Expand Down Expand Up @@ -387,6 +388,7 @@ func (self *Server) handleWorkReport(e *event) {

reply := constructReply(e.tp, slice)
c.Send(reply)
self.forwardReport++
}

func (self *Server) handleProtoEvt(e *event) {
Expand Down Expand Up @@ -507,6 +509,7 @@ func (self *Server) EvtLoop() {
stats.PubInt("job queue length", len(self.jobs))
stats.PubInt("queue count", len(self.funcWorker))
stats.PubInt("client count", len(self.client))
stats.PubInt64("forwardReport", self.forwardReport)
}
}
}
Expand Down

0 comments on commit 2e3a61a

Please sign in to comment.