FdbTransactionLog.Command
Namespace: FoundationDB.Filters.Logging · class
Base class of all types of operations performed on a transaction
Properties
ArgumentBytes
int? ArgumentBytes { get; }
Total size (in bytes) of the arguments
For selectors, only include the size of the keys
CallSite
StackTrace CallSite { get; }
StackTrace of the method that started this operation
Only if the option is set
Duration
TimeSpan Duration { get; }
Total duration of the command, or TimeSpan.Zero if the command is not yet completed
EndOffset
TimeSpan? EndOffset { get; }
Number of ticks, since the start of the transaction, when the operation completed (or null if it did not complete)
EndStep
int EndStep { get; }
Return the end step number of this command
Error
Exception Error { get; }
Exception thrown by this operation
Mode
Mode Mode { get; }
Return the mode of the operation (Read, Write, Metadata, Watch, ...)
Op
Operation Op { get; }
Return the type of operation
ResultBytes
int? ResultBytes { get; }
Total size (in bytes) of the result, or null if this operation does not produce a result
Includes the keys and values for range reads
ShortName
string ShortName { get; }
Returns the short version of the command name (up to two characters)
Snapshot
bool Snapshot { get; }
If true, the operation was executed in Snapshot mode
StartOffset
TimeSpan StartOffset { get; }
Number of ticks, since the start of the transaction, when the operation was started
Step
int Step { get; }
Return the step number of this command
All commands with the same step number where started in parallel
ThreadId
int ThreadId { get; }
Id of the thread that started the command
Methods
FromJson
static Command FromJson(JsonObject obj)
Deserializes a Command previously serialized with a call to ToJson
static List<Command> FromJson(JsonArray arr)
Deserializes an array of Command
arr— Array with one or more commands serialized into JSON Objects
GetArguments
string GetArguments(KeyResolver resolver)
Returns a formatted representation of the arguments, for logging purpose
GetResult
string GetResult(KeyResolver resolver)
Returns a formatted representation of the results, for logging purpose
ToJson
JsonObject ToJson(bool readOnly = true)
Serializes this Command into a JsonObject
The object can be deserialized back into a by calling
ToString
string ToString()
string ToString(KeyResolver resolver)