Skip to content

Commit

Permalink
GEODE-8784:Create matching Geode stats for all Redis INFO stats (apac…
Browse files Browse the repository at this point in the history
…he#5853)

Adds the following new Geode redis stats:
- totalConnectionsReceived
- keyspaceHits
- keyspaceMisses

Co-authored-by: John Hutchison <[email protected]>
Co-authored-by: Jens Deppe <[email protected]>
  • Loading branch information
3 people authored Dec 16, 2020
1 parent a42f89a commit 8700c32
Show file tree
Hide file tree
Showing 13 changed files with 494 additions and 342 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import org.apache.geode.internal.statistics.EnabledStatisticsClock;
import org.apache.geode.internal.statistics.StatisticsClock;
import org.apache.geode.redis.GeodeRedisServerRule;
import org.apache.geode.redis.internal.statistics.RedisStats;
import org.apache.geode.test.awaitility.GeodeAwaitility;

public class RedisStatsIntegrationTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
import org.apache.geode.redis.internal.pubsub.PubSub;
import org.apache.geode.redis.internal.pubsub.PubSubImpl;
import org.apache.geode.redis.internal.pubsub.Subscriptions;
import org.apache.geode.redis.internal.statistics.GeodeRedisStats;
import org.apache.geode.redis.internal.statistics.RedisStats;

/**
* The GeodeRedisServer is a server that understands the Redis protocol. As commands are sent to the
Expand Down Expand Up @@ -120,9 +122,12 @@ private static RedisStats createStats(InternalCache cache) {
InternalDistributedSystem system = cache.getInternalDistributedSystem();
StatisticsClock statisticsClock =
StatisticsClockFactory.clock(true);
return new RedisStats(system.getStatisticsManager(), statisticsClock);
}

return new RedisStats(statisticsClock,
new GeodeRedisStats(system.getStatisticsManager(),
"redisStats",
statisticsClock));
}

@VisibleForTesting
RedisStats getStats() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import org.apache.geode.redis.internal.data.RedisData;
import org.apache.geode.redis.internal.executor.key.RedisKeyCommands;
import org.apache.geode.redis.internal.executor.key.RedisKeyCommandsFunctionInvoker;
import org.apache.geode.redis.internal.statistics.RedisStats;

public class PassiveExpirationManager {
private static final Logger logger = LogService.getLogger();
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@

import org.apache.geode.cache.Region;
import org.apache.geode.redis.internal.RedisConstants;
import org.apache.geode.redis.internal.RedisStats;
import org.apache.geode.redis.internal.executor.StripedExecutor;
import org.apache.geode.redis.internal.statistics.RedisStats;

/**
* Provides methods to help implement command execution.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import org.apache.geode.cache.execute.FunctionException;
import org.apache.geode.cache.execute.FunctionService;
import org.apache.geode.redis.internal.RedisCommandType;
import org.apache.geode.redis.internal.RedisStats;
import org.apache.geode.redis.internal.data.ByteArrayWrapper;
import org.apache.geode.redis.internal.data.CommandHelper;
import org.apache.geode.redis.internal.data.RedisData;
Expand All @@ -34,6 +33,7 @@
import org.apache.geode.redis.internal.data.RedisSetCommandsFunctionExecutor;
import org.apache.geode.redis.internal.data.RedisStringCommandsFunctionExecutor;
import org.apache.geode.redis.internal.executor.string.SetOptions;
import org.apache.geode.redis.internal.statistics.RedisStats;

public class CommandFunction extends SingleResultRedisFunction {

Expand Down
Loading

0 comments on commit 8700c32

Please sign in to comment.