Skip to content

Add a metric to capture write enqueue latency#193

Draft
jasonk000 wants to merge 1 commit into
jkoch/loop-cpu-utilization-metricfrom
jkoch/loop-enqueue-to-write-latency-metric
Draft

Add a metric to capture write enqueue latency#193
jasonk000 wants to merge 1 commit into
jkoch/loop-cpu-utilization-metricfrom
jkoch/loop-enqueue-to-write-latency-metric

Conversation

@jasonk000
Copy link
Copy Markdown
Member

This captures from when the caller tries to send a request until the request is finally sent on the wire, primarily so we can see when the enqueue time is increasing (a signal for pressure on the IO loop).

This captures from when the caller tries to send a request until the
request is finally sent on the wire, primarily so we can see when the
enqueue time is increasing (a signal for pressure on the IO loop).
Copy link
Copy Markdown

@akhaku akhaku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

technically not sent on the wire but passed to the non-blocking socket, right?

Generally LGTM

if (wc <= 0L || wc < operationAttachedNs) return;
loopEnqueueToWriteLatency.record(wc - operationAttachedNs, TimeUnit.NANOSECONDS);
} catch (Throwable t) {
if (log.isDebugEnabled()) log.debug("recordLoopEnqueueToWriteLatency failed", t);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't really need the isDebugEnabled check here right since the expression in log.debug is cheap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants