You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by ja...@apache.org on 2024/03/06 21:59:46 UTC
(pinot) branch master updated: reduce Java enum .values() usage in TimerContext (#12579)
This is an automated email from the ASF dual-hosted git repository.
jackie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git
The following commit(s) were added to refs/heads/master by this push:
new acbbd01317 reduce Java enum .values() usage in TimerContext (#12579)
acbbd01317 is described below
commit acbbd01317e9a65b8baa51a982442d22b7eeebd1
Author: sullis <gi...@seansullivan.com>
AuthorDate: Wed Mar 6 13:59:40 2024 -0800
reduce Java enum .values() usage in TimerContext (#12579)
---
.../java/org/apache/pinot/core/query/request/context/TimerContext.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pinot-core/src/main/java/org/apache/pinot/core/query/request/context/TimerContext.java b/pinot-core/src/main/java/org/apache/pinot/core/query/request/context/TimerContext.java
index 175da9258a..be6fbbd7f1 100644
--- a/pinot-core/src/main/java/org/apache/pinot/core/query/request/context/TimerContext.java
+++ b/pinot-core/src/main/java/org/apache/pinot/core/query/request/context/TimerContext.java
@@ -25,10 +25,11 @@ import org.apache.pinot.common.metrics.ServerQueryPhase;
public class TimerContext {
+ private static final int SERVER_QUERY_PHASE_COUNT = ServerQueryPhase.values().length;
private final String _tableNameWithType;
private final ServerMetrics _serverMetrics;
private final long _queryArrivalTimeMs;
- private final Timer[] _phaseTimers = new Timer[ServerQueryPhase.values().length];
+ private final Timer[] _phaseTimers = new Timer[SERVER_QUERY_PHASE_COUNT];
public class Timer {
private final ServerQueryPhase _queryPhase;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org