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

Method updateResponseWriter

rest/handler.go:787–794  ·  view source on GitHub ↗

updateResponseWriter will create an updated Response Writer if we need to log db stats.

()

Source from the content-addressed store, hash-verified

785
786// updateResponseWriter will create an updated Response Writer if we need to log db stats.
787func (h *handler) updateResponseWriter() {
788 if !h.shouldUpdateBytesTransferredStats() {
789 return
790 }
791 h.response = NewCountedResponseWriter(h.response,
792 h.db.DbStats.Database().PublicRestBytesWritten,
793 defaultBytesStatsReportingInterval)
794}
795
796func (h *handler) logDuration(realTime bool) {
797 if h.loggedDuration {

Callers 1

Calls 3

NewCountedResponseWriterFunction · 0.85
DatabaseMethod · 0.45

Tested by

no test coverage detected