diff options
author | Harald Musum <musum@verizonmedia.com> | 2020-08-18 06:52:46 +0200 |
---|---|---|
committer | Harald Musum <musum@verizonmedia.com> | 2020-08-18 06:52:46 +0200 |
commit | 03adbb4e47a4f4ad8421dc36fc5ba765e7cfcffb (patch) | |
tree | 6d136e0350f6d8e54f4006535b5a2f6cd5eff16b /config | |
parent | 88e293db7cb6480d6970511350fc18709309b2c1 (diff) |
Use correct hostname in request
Diffstat (limited to 'config')
-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); } } + } |