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

Add initial logging statements to load generators

parent 8893d80e
No related branches found
No related tags found
No related merge requests found
...@@ -19,12 +19,13 @@ import titan.ccp.models.records.ActivePowerRecord; ...@@ -19,12 +19,13 @@ import titan.ccp.models.records.ActivePowerRecord;
public class LoadGenerator { public class LoadGenerator {
private static Logger LOGGER = LoggerFactory.getLogger(LoadGenerator.class); private static final Logger LOGGER = LoggerFactory.getLogger(LoadGenerator.class);
private static final int WL_MAX_RECORDS = 150_000; private static final int WL_MAX_RECORDS = 150_000;
public static void main(final String[] args) throws InterruptedException, IOException { public static void main(final String[] args) throws InterruptedException, IOException {
// uc1 // uc1
LOGGER.info("Start workload generator for use case UC1.");
final int numSensors = final int numSensors =
Integer.parseInt(Objects.requireNonNullElse(System.getenv("NUM_SENSORS"), "10")); Integer.parseInt(Objects.requireNonNullElse(System.getenv("NUM_SENSORS"), "10"));
......
...@@ -11,6 +11,8 @@ import java.util.concurrent.TimeUnit; ...@@ -11,6 +11,8 @@ import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import kafkaSender.KafkaRecordSender; import kafkaSender.KafkaRecordSender;
import org.apache.kafka.clients.producer.ProducerConfig; import org.apache.kafka.clients.producer.ProducerConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import titan.ccp.configuration.events.Event; import titan.ccp.configuration.events.Event;
import titan.ccp.model.sensorregistry.MutableAggregatedSensor; import titan.ccp.model.sensorregistry.MutableAggregatedSensor;
import titan.ccp.model.sensorregistry.MutableSensorRegistry; import titan.ccp.model.sensorregistry.MutableSensorRegistry;
...@@ -18,7 +20,10 @@ import titan.ccp.models.records.ActivePowerRecord; ...@@ -18,7 +20,10 @@ import titan.ccp.models.records.ActivePowerRecord;
public class LoadGenerator { public class LoadGenerator {
private static final Logger LOGGER = LoggerFactory.getLogger(LoadGenerator.class);
public static void main(final String[] args) throws InterruptedException, IOException { public static void main(final String[] args) throws InterruptedException, IOException {
LOGGER.info("Start workload generator for use case UC2.");
final String hierarchy = Objects.requireNonNullElse(System.getenv("HIERARCHY"), "deep"); final String hierarchy = Objects.requireNonNullElse(System.getenv("HIERARCHY"), "deep");
final int numNestedGroups = Integer final int numNestedGroups = Integer
......
...@@ -11,14 +11,19 @@ import java.util.concurrent.TimeUnit; ...@@ -11,14 +11,19 @@ import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import kafkaSender.KafkaRecordSender; import kafkaSender.KafkaRecordSender;
import org.apache.kafka.clients.producer.ProducerConfig; import org.apache.kafka.clients.producer.ProducerConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import titan.ccp.model.sensorregistry.MutableAggregatedSensor; import titan.ccp.model.sensorregistry.MutableAggregatedSensor;
import titan.ccp.model.sensorregistry.MutableSensorRegistry; import titan.ccp.model.sensorregistry.MutableSensorRegistry;
import titan.ccp.models.records.ActivePowerRecord; import titan.ccp.models.records.ActivePowerRecord;
public class LoadGenerator { public class LoadGenerator {
private static final Logger LOGGER = LoggerFactory.getLogger(LoadGenerator.class);
public static void main(final String[] args) throws InterruptedException, IOException { public static void main(final String[] args) throws InterruptedException, IOException {
// uc3 // uc3
LOGGER.info("Start workload generator for use case UC3.");
final int numSensor = final int numSensor =
Integer.parseInt(Objects.requireNonNullElse(System.getenv("NUM_SENSORS"), "10")); Integer.parseInt(Objects.requireNonNullElse(System.getenv("NUM_SENSORS"), "10"));
......
...@@ -12,12 +12,17 @@ import java.util.stream.Collectors; ...@@ -12,12 +12,17 @@ import java.util.stream.Collectors;
import java.util.stream.IntStream; import java.util.stream.IntStream;
import kafkaSender.KafkaRecordSender; import kafkaSender.KafkaRecordSender;
import org.apache.kafka.clients.producer.ProducerConfig; import org.apache.kafka.clients.producer.ProducerConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import titan.ccp.models.records.ActivePowerRecord; import titan.ccp.models.records.ActivePowerRecord;
public class LoadGenerator { public class LoadGenerator {
private static final Logger LOGGER = LoggerFactory.getLogger(LoadGenerator.class);
public static void main(final String[] args) throws InterruptedException, IOException { public static void main(final String[] args) throws InterruptedException, IOException {
// uc4 // uc4
LOGGER.info("Start workload generator for use case UC4.");
final int numSensor = final int numSensor =
Integer.parseInt(Objects.requireNonNullElse(System.getenv("NUM_SENSORS"), "10")); Integer.parseInt(Objects.requireNonNullElse(System.getenv("NUM_SENSORS"), "10"));
......
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