Skip to content

Commit

Permalink
Fix the bogus high write delay latency metric
Browse files Browse the repository at this point in the history
Reviewed By: kaczmarekmhl

Differential Revision: D62313198

fbshipit-source-id: 626999588a6f47ea6ceb9337199340bd4fae558a
  • Loading branch information
Tao Chen (RPC) authored and facebook-github-bot committed Sep 6, 2024
1 parent 826532d commit 0dc60d6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions thrift/lib/cpp/server/TServerObserver.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,16 @@ class TServerObserver {
}

folly::Optional<uint64_t> writeDelayLatencyUsec() const {
if (writeBegin != clock::time_point()) {
if (writeBegin != clock::time_point() &&
processEnd != clock::time_point()) {
return to_microseconds(writeBegin - processEnd);
}
return {};
}

folly::Optional<uint64_t> writeLatencyUsec() const {
if (writeBegin != clock::time_point()) {
if (writeBegin != clock::time_point() &&
writeEnd != clock::time_point()) {
return to_microseconds(writeEnd - writeBegin);
}
return {};
Expand Down

0 comments on commit 0dc60d6

Please sign in to comment.