本文整理汇总了Golang中github.com/couchbase/query/server.Server.Metrics方法的典型用法代码示例。如果您正苦于以下问题:Golang Server.Metrics方法的具体用法?Golang Server.Metrics怎么用?Golang Server.Metrics使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/couchbase/query/server.Server
的用法示例。
在下文中一共展示了Server.Metrics方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: Execute
func (this *httpRequest) Execute(srvr *server.Server, signature value.Value, stopNotify chan bool) {
defer this.stopAndClose(server.COMPLETED)
this.NotifyStop(stopNotify)
this.setHttpCode(http.StatusOK)
_ = this.writePrefix(srvr, signature) &&
this.writeResults()
this.writeSuffix(srvr.Metrics(), "")
this.writer.noMoreData()
}
示例2: Failed
func (this *httpRequest) Failed(srvr *server.Server) {
defer this.stopAndClose(server.FATAL)
this.writeString("{\n")
this.writeRequestID()
this.writeClientContextID()
this.writeErrors()
this.writeWarnings()
this.writeState("")
this.writeMetrics(srvr.Metrics())
this.writeString("\n}\n")
this.writer.noMoreData()
}
示例3: Execute
func (this *httpRequest) Execute(srvr *server.Server, signature value.Value, stopNotify chan bool) {
this.NotifyStop(stopNotify)
this.setHttpCode(http.StatusOK)
_ = this.writePrefix(srvr, signature) &&
this.writeResults()
state := this.State()
this.writeSuffix(srvr.Metrics(), state)
this.writer.noMoreData()
if state != server.TIMEOUT {
this.stopAndClose(server.COMPLETED)
} else {
this.Close()
}
}