Table of Contents

Interface IProfiledCommand

Namespace
StackExchange.Redis
Assembly
StackExchange.Redis.StrongName.dll

A profiled command against a redis instance.

TimeSpans returned by this interface use a high precision timer if possible. DateTimes returned by this interface are no more precise than DateTime.UtcNow.

public interface IProfiledCommand

Properties

Command

The name of this command.

string Command { get; }

Property Value

string

CommandCreated

When this command was created, will be approximately when the paired method of StackExchange.Redis was called but before that method returned.

Note that the resolution of the returned DateTime is limited by DateTime.UtcNow.

DateTime CommandCreated { get; }

Property Value

DateTime

CreationToEnqueued

How long this command waited to be added to the queue of pending redis commands. A large TimeSpan indicates serious contention for the pending queue.

TimeSpan CreationToEnqueued { get; }

Property Value

TimeSpan

Db

The Db this command was sent to.

int Db { get; }

Property Value

int

ElapsedTime

How long it took this redis command to be processed, from creation to deserializing the final response.

Note that this TimeSpan does not include time spent awaiting a Task in consumer code.

TimeSpan ElapsedTime { get; }

Property Value

TimeSpan

EndPoint

The endpoint this command was sent to.

EndPoint EndPoint { get; }

Property Value

EndPoint

EnqueuedToSending

How long this command spent in the pending queue before being sent to redis. A large TimeSpan can indicate a large number of pending events, large pending events, or network issues.

TimeSpan EnqueuedToSending { get; }

Property Value

TimeSpan

Flags

The CommandFlags the command was submitted with.

CommandFlags Flags { get; }

Property Value

CommandFlags

ResponseToCompletion

How long between Redis responding to this command and awaiting consumers being notified.

TimeSpan ResponseToCompletion { get; }

Property Value

TimeSpan

RetransmissionOf

If a command has to be resent due to an ASK or MOVED response from redis (in a cluster configuration), the second sending of the command will have this property set to the original IProfiledCommand.

This can only be set if redis is configured as a cluster.

IProfiledCommand RetransmissionOf { get; }

Property Value

IProfiledCommand

RetransmissionReason

If RetransmissionOf is not null, this property will be set to either Ask or Moved to indicate what sort of response triggered the retransmission.

This can be useful for determining the root cause of extra commands.

RetransmissionReasonType? RetransmissionReason { get; }

Property Value

RetransmissionReasonType?

SentToResponse

How long before Redis responded to this command and it's response could be handled after it was sent. A large TimeSpan can indicate a large response body, an overtaxed redis instance, or network issues.

TimeSpan SentToResponse { get; }

Property Value

TimeSpan