File tree Expand file tree Collapse file tree 3 files changed +5
-13
lines changed
src/main/java/com/redis/benchmark/utils Expand file tree Collapse file tree 3 files changed +5
-13
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ benchmark.key.data=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
3434## Usage
3535Run the command with the parameters below to test connectivity to REDIS, and also generate the keys for executing ** GET** benchmarks:
3636``` bash
37- java -DREDIS_BENCHMARK_CONFIG=benchmark.properties -jar redis-benchmark.jar -wi 1 -i 1 -t 1 -f 0
37+ java -DREDIS_BENCHMARK_CONFIG=benchmark.properties -jar redis-benchmark.jar -wi 1 -i 1 -t 1 -f 1
3838```
3939<details ><summary >Expected output:</summary >
4040<p >
Original file line number Diff line number Diff line change @@ -69,12 +69,12 @@ public String getConnectionCircuitBreakerFailureRateThreshold() {
6969
7070 public String getRedisUser () {
7171 Properties properties = getProperties ();
72- return properties .getProperty ("redis.user" , "default" );
72+ return properties .getProperty ("redis.user" );
7373 }
7474
7575 public String getRedisPassword () {
7676 Properties properties = getProperties ();
77- return properties .getProperty ("redis.password" , "" );
77+ return properties .getProperty ("redis.password" );
7878 }
7979
8080 String getKeyContentData () {
Original file line number Diff line number Diff line change @@ -24,18 +24,10 @@ private void createJedisConnection() {
2424 Set <HostAndPort > hostAndPorts = BenchmarkConfiguration .get ().getRedisHostAndPorts ();
2525 int index = 0 ;
2626
27- String user = BenchmarkConfiguration .get ().getRedisUser ();
28- if (user != null && !user .isEmpty ())
29- user = BenchmarkConfiguration .get ().getRedisUser ();
30-
31- String password = BenchmarkConfiguration .get ().getRedisPassword ();
32- if (password != null && !password .isEmpty ())
33- password = BenchmarkConfiguration .get ().getRedisPassword ();
34-
3527 try {
3628 JedisClientConfig jedisClientConfig = DefaultJedisClientConfig .builder ()
37- .user (user )
38- .password (password )
29+ .user (BenchmarkConfiguration . get (). getRedisUser () )
30+ .password (BenchmarkConfiguration . get (). getRedisPassword () )
3931 .clientName ("RedisBenchmark" )
4032 .build ();
4133
You can’t perform that action at this time.
0 commit comments