MCPcopy
hub / github.com/redis/go-redis / RecordPipelineOperationDuration

Function RecordPipelineOperationDuration

internal/otel/metrics.go:227–229  ·  view source on GitHub ↗

RecordPipelineOperationDuration records the total pipeline/transaction duration. This is called from redis.go after pipeline/transaction execution completes. operationName should be "PIPELINE" for regular pipelines or "MULTI" for transactions. err is the error from the pipeline execution (can be nil

(ctx context.Context, duration time.Duration, operationName string, cmdCount int, attempts int, err error, cn *pool.Conn, dbIndex int)

Source from the content-addressed store, hash-verified

225// err is the error from the pipeline execution (can be nil).
226// dbIndex is the Redis database index (0-15).
227func RecordPipelineOperationDuration(ctx context.Context, duration time.Duration, operationName string, cmdCount int, attempts int, err error, cn *pool.Conn, dbIndex int) {
228 getRecorder().RecordPipelineOperationDuration(ctx, duration, operationName, cmdCount, attempts, err, cn, dbIndex)
229}
230
231// RecordConnectionCreateTime records the time it took to create a new connection.
232func RecordConnectionCreateTime(ctx context.Context, duration time.Duration, cn *pool.Conn) {

Callers

nothing calls this directly

Calls 2

getRecorderFunction · 0.85

Tested by

no test coverage detected