Example #1
0
func newProxyStats() (this *ProxyStats) {
	this = new(ProxyStats)
	this.pubCalls = metrics.NewMeter()
	this.subCalls = metrics.NewMeter()
	this.unsubCalls = metrics.NewMeter()
	this.outChannels = metrics.NewMeter()

	return
}
Example #2
0
func (this *ProxyStats) registerMetrics() {
	this.pubCalls = metrics.NewMeter()
	metrics.Register("proxy.pub_calls", this.pubCalls)

	this.subCalls = metrics.NewMeter()
	metrics.Register("proxy.sub_calls", this.subCalls)

	this.unsubCalls = metrics.NewMeter()
	metrics.Register("proxy.unsub_calls", this.unsubCalls)

	this.outChannels = metrics.NewMeter()
	metrics.Register("proxy.out_channels", this.outChannels)
}
Example #3
0
func NewServerStats() (this *ServerStats) {
	this = new(ServerStats)
	this.HttpJsonServer = server.NewHttpJsonServer()
	this.CallLatencies = metrics.NewHistogram(metrics.NewExpDecaySample(1028, 0.015))
	metrics.Register("latency.call", this.CallLatencies)
	this.CallPerSecond = metrics.NewMeter()
	metrics.Register("qps.call", this.CallPerSecond)

	return
}