Skip to content

Commit

Permalink
Also get the number of flows in the datapath...
Browse files Browse the repository at this point in the history
  • Loading branch information
inercia committed Nov 10, 2015
1 parent 57109c5 commit 5533987
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions router/fastdp.go
Expand Up @@ -219,7 +219,13 @@ func (fastdp fastDatapathBridge) String() string {
}

func (fastdp fastDatapathBridge) Stats() map[string]int {
flowsCount := 0
if flows, err := fastdp.dp.EnumerateFlows(); err == nil {
flowsCount = len(flows)
}

return map[string]int{
"FlowCount": flowsCount,
"FlowMisses": (int)(atomic.LoadUint64(&fastdp.missCount)),
}
}
Expand Down

0 comments on commit 5533987

Please sign in to comment.