Skip to content

Commit

Permalink
Allow specifying initial metrics.
Browse files Browse the repository at this point in the history
  • Loading branch information
mitar authored and felixge committed Apr 24, 2022
1 parent 67cc0c4 commit ef9fc62
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion capture_metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ func CaptureMetricsFn(w http.ResponseWriter, fn func(http.ResponseWriter)) Metri
}

// CaptureMetrics wraps w and calls fn with the wrapped w and updates
// Metrics m with the resulting metrics.
// Metrics m with the resulting metrics. This is similar to CaptureMetricsFn,
// but allows one to customize starting Metrics object.
func (m *Metrics) CaptureMetrics(w http.ResponseWriter, fn func(http.ResponseWriter)) {
var (
start = time.Now()
Expand Down

0 comments on commit ef9fc62

Please sign in to comment.