File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -32,9 +32,14 @@ type ServerStatistics struct {
3232 TotalTrafficOut metric.DateCounter
3333 CurConns metric.Counter
3434
35- ClientCounts metric.Counter
35+ // counter for clients
36+ ClientCounts metric.Counter
37+
38+ // counter for proxy types
3639 ProxyTypeCounts map [string ]metric.Counter
3740
41+ // statistics for different proxies
42+ // key is proxy name
3843 ProxyStatistics map [string ]* ProxyStatistics
3944
4045 mu sync.Mutex
@@ -84,7 +89,7 @@ func StatsNewProxy(name string, proxyType string) {
8489 globalStats .ProxyTypeCounts [proxyType ] = counter
8590
8691 proxyStats , ok := globalStats .ProxyStatistics [name ]
87- if ! ok {
92+ if ! ( ok && proxyStats . ProxyType == proxyType ) {
8893 proxyStats = & ProxyStatistics {
8994 ProxyType : proxyType ,
9095 CurConns : metric .NewCounter (),
Original file line number Diff line number Diff line change @@ -111,6 +111,7 @@ func NewService() (svr *Service, err error) {
111111 err = fmt .Errorf ("Create dashboard web server error, %v" , err )
112112 return
113113 }
114+ log .Info ("Dashboard listen on %s:%d" , config .ServerCommonCfg .BindAddr , config .ServerCommonCfg .DashboardPort )
114115 }
115116 return
116117}
You can’t perform that action at this time.
0 commit comments