MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / shouldUpdateBytesTransferredStats

Method shouldUpdateBytesTransferredStats

rest/handler.go:773–784  ·  view source on GitHub ↗

shouldUpdateBytesTransferredStats returns true if we want to log the bytes transferred. The criteria is if this is db scoped over the public port. Blip is skipped since those stats are tracked separately.

()

Source from the content-addressed store, hash-verified

771
772// shouldUpdateBytesTransferredStats returns true if we want to log the bytes transferred. The criteria is if this is db scoped over the public port. Blip is skipped since those stats are tracked separately.
773func (h *handler) shouldUpdateBytesTransferredStats() bool {
774 if h.db == nil {
775 return false
776 }
777 if h.serverType != publicServer {
778 return false
779 }
780 if h.isBlipSync() {
781 return false
782 }
783 return true
784}
785
786// updateResponseWriter will create an updated Response Writer if we need to log db stats.
787func (h *handler) updateResponseWriter() {

Callers 3

invokeMethod · 0.95
updateResponseWriterMethod · 0.95
reportDbStatsMethod · 0.95

Calls 1

isBlipSyncMethod · 0.95

Tested by

no test coverage detected