Skip to content

[rpc] Measure synchronous request processing time - #4845

Open
platinumhamburg wants to merge 1 commit into
apache:mainfrom
platinumhamburg:rpc-sync-process-metrics
Open

platinumhamburg wants to merge 1 commit into
apache:mainfrom
platinumhamburg:rpc-sync-process-metrics

Conversation

@platinumhamburg

Copy link
Copy Markdown
Contributor

Purpose

Closes #4844.

requestProcessTimeMs includes time spent waiting for an asynchronous response future, including delayed writes. It does not show how long an RPC occupies a request worker. This change measures that synchronous interval separately.

Brief change log

  • Record requestSyncProcessTimeUs from request dequeue through synchronous processing and request-buffer release, including failed requests.
  • Record requestSyncProcessTimeUsSum for interval worker-time accounting by the existing request type groups.
  • Reuse the same request classification for synchronous and completion metrics without adding labels or changing existing latency semantics.

Tests

  • ./mvnw -pl fluss-rpc -am -Dtest=RequestProcessorMetricsTest,RequestsMetricsTest,NettyServerHandlerTest -Dsurefire.failIfNoSpecifiedTests=false test -q passed.
  • Re-ran RequestProcessorMetricsTest after its final test adjustment; passed.
  • The affected Maven build passed Spotless, Checkstyle, and RAT; git diff --check passed.

API and Format

Adds two server metrics. No RPC API or storage format changes.

Documentation

Updated the request metric reference with the synchronous timing boundary and its distinction from asynchronous request completion.

Record per-request worker occupancy separately from asynchronous response completion. Export its duration distribution and cumulative sum by existing request type, including failed requests.
@platinumhamburg
platinumhamburg marked this pull request as ready for review October 23, 2026 22:44
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.

[rpc] Measure synchronous request processing time

1 participant