GetOperationDurationCallback returns the callback for operation duration.
()
| 133 | |
| 134 | // GetOperationDurationCallback returns the callback for operation duration. |
| 135 | func GetOperationDurationCallback() func(ctx context.Context, duration time.Duration, cmd Cmder, attempts int, err error, cn *pool.Conn, dbIndex int) { |
| 136 | recorderMu.RLock() |
| 137 | cb := operationDurationCallback |
| 138 | recorderMu.RUnlock() |
| 139 | return cb |
| 140 | } |
| 141 | |
| 142 | // GetPipelineOperationDurationCallback returns the callback for pipeline operation duration. |
| 143 | func GetPipelineOperationDurationCallback() func(ctx context.Context, duration time.Duration, operationName string, cmdCount int, attempts int, err error, cn *pool.Conn, dbIndex int) { |