Skip to content

Commit

Permalink
reduce Java enum .values() usage in TimerContext (#12579)
Browse files Browse the repository at this point in the history
  • Loading branch information
sullis authored Mar 6, 2024
1 parent c6cfc60 commit acbbd01
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@


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;
Expand Down

0 comments on commit acbbd01

Please sign in to comment.