diff options
author | Harald Musum <musum@verizonmedia.com> | 2020-08-18 07:41:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-18 07:41:13 +0200 |
commit | 1ec11fea21acbb3a0f6a8d04da9c6aea54d33b63 (patch) | |
tree | a04ae40bb72d5fe00115d8d6af512f28f4ad8b6a | |
parent | b5beb2b6c6d4dbcbb504e076e0f5dde1c79be39f (diff) | |
parent | 03adbb4e47a4f4ad8421dc36fc5ba765e7cfcffb (diff) |
Merge pull request #14075 from vespa-engine/musum/set-correct-hostname
Use correct hostname in request
-rw-r--r-- | config/src/main/java/com/yahoo/vespa/config/benchmark/LoadTester.java | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/config/src/main/java/com/yahoo/vespa/config/benchmark/LoadTester.java b/config/src/main/java/com/yahoo/vespa/config/benchmark/LoadTester.java index 8a0f24bcd48..3a8d80e5ffe 100644 --- a/config/src/main/java/com/yahoo/vespa/config/benchmark/LoadTester.java +++ b/config/src/main/java/com/yahoo/vespa/config/benchmark/LoadTester.java @@ -43,11 +43,11 @@ import java.util.concurrent.ThreadLocalRandom; public class LoadTester { private static boolean debug = false; - private Transport transport = new Transport("rpc-client"); + private final Transport transport = new Transport("rpc-client"); protected Supervisor supervisor = new Supervisor(transport); private List<ConfigKey<?>> configs = new ArrayList<>(); private Map<ConfigDefinitionKey, Tuple2<String, String[]>> defs = new HashMap<>(); - private CompressionType compressionType = JRTConfigRequestFactory.getCompressionType(); + private final CompressionType compressionType = JRTConfigRequestFactory.getCompressionType(); /** * @param args command-line arguments @@ -149,7 +149,7 @@ public class LoadTester { return ret; } - private class Metrics { + private static class Metrics { long totBytes = 0; long totLatency = 0; @@ -214,9 +214,7 @@ public class LoadTester { Tuple2<String, String[]> defContent = defs.get(dKey); if (defContent == null && defs.size() > 0) { // Only complain if we actually did run with a def dir System.out.println("# No def found for " + dKey + ", not sending in request."); - }/* else { - System.out.println("# FOUND: "+dKey+" : "+ StringUtilities.implode(defContent, "\n")); - }*/ + } request = getRequest(ConfigKey.createFull(reqKey.getName(), reqKey.getConfigId(), reqKey.getNamespace(), defContent.first), defContent.second); if (debug) System.out.println("# Requesting: " + reqKey); long start = System.currentTimeMillis(); @@ -261,7 +259,7 @@ public class LoadTester { if (defContent == null) defContent = new String[0]; final long serverTimeout = 1000; return JRTClientConfigRequestV3.createWithParams(reqKey, DefContent.fromList(Arrays.asList(defContent)), - "unknown", "", 0, serverTimeout, Trace.createDummy(), + ConfigUtils.getCanonicalHostName(), "", 0, serverTimeout, Trace.createDummy(), compressionType, Optional.empty()); } @@ -269,4 +267,5 @@ public class LoadTester { return supervisor.connect(spec); } } + } |