From 8a339473a2eb6804c5f94e561b8e8a71c93fa6b3 Mon Sep 17 00:00:00 2001 From: kennguyengk Date: Mon, 22 Aug 2022 07:28:36 -0400 Subject: [PATCH] =?UTF-8?q?chu=20thich=20cho=20bien=20myURL=20s=C6=B0a=20l?= =?UTF-8?q?oi=20magic=20number=2050=20voi=20chu=20thich=20bien=20ro=20rang?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/rampatra/misc/BotTesting.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/rampatra/misc/BotTesting.java b/src/main/java/com/rampatra/misc/BotTesting.java index 398e60b6..8de98a02 100644 --- a/src/main/java/com/rampatra/misc/BotTesting.java +++ b/src/main/java/com/rampatra/misc/BotTesting.java @@ -19,11 +19,16 @@ public class BotTesting { public static void main(String args[]) throws MalformedURLException { - final URL myURL = new URL("http://localhost:8080/ifb.html"); + + // URL use to track + String testUrl = "http://localhost:8080/ifb.html"; + final URL myURL = new URL(testUrl); ExecutorService executorService = Executors.newFixedThreadPool(20); Long start = System.currentTimeMillis(); - for (int i = 0; i <= 50; i++) { + // times to run the request + int requestTimes = 50; + for (int i = 0; i <= requestTimes; i++) { executorService.execute(new Runnable() { @Override