Skip to content

Commit

Permalink
Use TotalMilliseconds instead of TimeSpan in delay telemetry (#76309)
Browse files Browse the repository at this point in the history
Just noticed that recent telemetry change #76045 uses Timestamp to
report delay, e.g. `00:00:00.0006369`. Processing timestamp is
expensive. I'm updating telemetry to use `double TotalMillseconds`, e.g.
`68.9512` (sic, this example is pasted from a different measurement)
  • Loading branch information
Cosifne authored Dec 7, 2024
2 parents 8b69bdd + 462cbbc commit 4fdba2e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ private void PostTelemetry(bool isCommit)
m["smartRenameSessionInProgress"] = _smartRenameSession.IsInProgress;
m["smartRenameCorrelationId"] = _smartRenameSession.CorrelationId;
m["smartRenameSemanticContextUsed"] = _semanticContextUsed;
m["smartRenameSemanticContextDelay"] = _semanticContextDelay;
m["smartRenameSemanticContextDelay"] = _semanticContextDelay.TotalMilliseconds;
m["smartRenameSemanticContextError"] = _semanticContextError;
}));
}
Expand All @@ -69,7 +69,7 @@ private void PostTelemetry(bool isCommit)
m["smartRenameSessionInProgress"] = _smartRenameSession.IsInProgress;
m["smartRenameCorrelationId"] = _smartRenameSession.CorrelationId;
m["smartRenameSemanticContextUsed"] = _semanticContextUsed;
m["smartRenameSemanticContextDelay"] = _semanticContextDelay;
m["smartRenameSemanticContextDelay"] = _semanticContextDelay.TotalMilliseconds;
m["smartRenameSemanticContextError"] = _semanticContextError;
}));
}
Expand Down

0 comments on commit 4fdba2e

Please sign in to comment.