Skip to content
Snippets Groups Projects
Commit 99c23943 authored by Sören Henning's avatar Sören Henning
Browse files

Remove sysout

parent d80f620d
No related branches found
No related tags found
No related merge requests found
Pipeline #404 canceled
...@@ -61,13 +61,14 @@ public class LoadGenerator { ...@@ -61,13 +61,14 @@ public class LoadGenerator {
final ScheduledExecutorService executor = Executors.newScheduledThreadPool(threads); final ScheduledExecutorService executor = Executors.newScheduledThreadPool(threads);
final Random random = new Random(); final Random random = new Random();
LOGGER.info("Start setting up sensors.");
for (final String sensor : sensors) { for (final String sensor : sensors) {
System.out.println("working");
final int initialDelay = random.nextInt(periodMs); final int initialDelay = random.nextInt(periodMs);
executor.scheduleAtFixedRate(() -> { executor.scheduleAtFixedRate(() -> {
kafkaRecordSender.write(new ActivePowerRecord(sensor, System.currentTimeMillis(), value)); kafkaRecordSender.write(new ActivePowerRecord(sensor, System.currentTimeMillis(), value));
}, initialDelay, periodMs, TimeUnit.MILLISECONDS); }, initialDelay, periodMs, TimeUnit.MILLISECONDS);
} }
LOGGER.info("Finished setting up sensors.");
System.out.println("Wait for termination..."); System.out.println("Wait for termination...");
executor.awaitTermination(30, TimeUnit.DAYS); executor.awaitTermination(30, TimeUnit.DAYS);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment