aliehsaeedii commented on code in PR #21201:
URL: https://github.com/apache/kafka/pull/21201#discussion_r2686244152
##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/metrics/StreamsMetricsImpl.java:
##########
@@ -150,12 +150,12 @@ public int hashCode() {
public static final String OPERATIONS = " operations";
public static final String TOTAL_DESCRIPTION = "The total number of ";
public static final String RATE_DESCRIPTION = "The average per-second
number of ";
- public static final String RATIO_DESCRIPTION = "The fraction of time the
thread spent on ";
public static final String AVG_LATENCY_DESCRIPTION = "The average latency
of ";
public static final String MAX_LATENCY_DESCRIPTION = "The maximum latency
of ";
public static final String LATENCY_DESCRIPTION_SUFFIX = " in milliseconds";
public static final String RATE_DESCRIPTION_PREFIX = "The average number
of ";
public static final String RATE_DESCRIPTION_SUFFIX = " per second";
+ public static final String WINDOWED_RATIO_DESCRIPTION_PREFIX = "The ratio,
over a rolling measurement window, ";
Review Comment:
Good, it’s your call, but I’d keep it simple and let whoever comes next make
further adjustments if they’re ever needed.
##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/DefaultStateUpdater.java:
##########
@@ -1035,10 +1094,10 @@ private Stream<Task> streamOfNonPausedTasks() {
private class StateUpdaterMetrics {
private static final String STATE_LEVEL_GROUP =
"stream-state-updater-metrics";
- private static final String IDLE_RATIO_DESCRIPTION = RATIO_DESCRIPTION
+ "being idle";
- private static final String RESTORE_RATIO_DESCRIPTION =
RATIO_DESCRIPTION + "restoring active tasks";
- private static final String UPDATE_RATIO_DESCRIPTION =
RATIO_DESCRIPTION + "updating standby tasks";
- private static final String CHECKPOINT_RATIO_DESCRIPTION =
RATIO_DESCRIPTION + "checkpointing tasks restored progress";
+ private static final String IDLE_RATIO_DESCRIPTION =
WINDOWED_RATIO_DESCRIPTION_PREFIX + THREAD_TIME_UNIT_DESCRIPTION + "being
idle";
Review Comment:
Any reason that we split a sentence into two vars
(`WINDOWED_RATIO_DESCRIPTION_PREFIX` and `THREAD_TIME_UNIT_DESCRIPTION`)?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]