mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-19 14:34:17 +00:00
Update internal/proxy/app_conn.go
Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
This commit is contained in:
co-authored by
M. J. Fromberger
parent
e049236c68
commit
c5a72c44cc
@@ -240,6 +240,9 @@ func (app *appConnSnapshot) ApplySnapshotChunkSync(
|
||||
return app.appConn.ApplySnapshotChunkSync(ctx, req)
|
||||
}
|
||||
|
||||
// addTimeSample returns a function that, when called, adds a sample to m for
|
||||
// the time elapsed since the original call to addTimeSample. This function should
|
||||
// be deferred near the start of a function to be sampled.
|
||||
func addTimeSample(m metrics.Histogram) func() {
|
||||
start := time.Now()
|
||||
return func() { m.Observe(time.Since(start).Seconds()) }
|
||||
|
||||
Reference in New Issue
Block a user