Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Profiler naming fixes #1734

Merged
merged 1 commit into from
May 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/StackExchange.Redis/Message.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ internal void SetBacklogState(int position, PhysicalConnection physical)

// All for profiling purposes
private ProfiledCommand performance;
internal DateTime createdDateTime;
internal long createdTimestamp;
internal DateTime CreatedDateTime;
internal long CreatedTimestamp;

protected Message(int db, CommandFlags flags, RedisCommand command)
{
Expand Down Expand Up @@ -128,8 +128,8 @@ protected Message(int db, CommandFlags flags, RedisCommand command)
Flags = flags & UserSelectableFlags;
if (masterOnly) SetMasterOnly();

createdDateTime = DateTime.UtcNow;
createdTimestamp = System.Diagnostics.Stopwatch.GetTimestamp();
CreatedDateTime = DateTime.UtcNow;
CreatedTimestamp = System.Diagnostics.Stopwatch.GetTimestamp();
Status = CommandStatus.WaitingToBeSent;
}

Expand Down Expand Up @@ -165,8 +165,8 @@ internal void PrepareToResend(ServerEndPoint resendTo, bool isMoved)
oldPerformance.SetCompleted();
performance = null;

createdDateTime = DateTime.UtcNow;
createdTimestamp = System.Diagnostics.Stopwatch.GetTimestamp();
CreatedDateTime = DateTime.UtcNow;
CreatedTimestamp = System.Diagnostics.Stopwatch.GetTimestamp();
performance = ProfiledCommand.NewAttachedToSameContext(oldPerformance, resendTo, isMoved);
performance.SetMessage(this);
Status = CommandStatus.WaitingToBeSent;
Expand Down
4 changes: 2 additions & 2 deletions src/StackExchange.Redis/Profiling/ProfiledCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ public void SetMessage(Message msg)
if (Message != null) throw new InvalidOperationException($"{nameof(SetMessage)} called more than once");

Message = msg;
MessageCreatedDateTime = msg.createdDateTime;
MessageCreatedTimeStamp = msg.createdTimestamp;
MessageCreatedDateTime = msg.CreatedDateTime;
MessageCreatedTimeStamp = msg.CreatedTimestamp;
}

public void SetEnqueued() => SetTimestamp(ref EnqueuedTimeStamp);
Expand Down