updateResponseWriter will create an updated Response Writer if we need to log db stats.
()
| 785 | |
| 786 | // updateResponseWriter will create an updated Response Writer if we need to log db stats. |
| 787 | func (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 | |
| 796 | func (h *handler) logDuration(realTime bool) { |
| 797 | if h.loggedDuration { |
no test coverage detected