<commit_before>package tools.descartes.teastore.kieker.rabbitmq;

import kieker.analysis.IProjectContext;
import kieker.analysis.plugin.annotation.InputPort;
import kieker.analysis.plugin.filter.AbstractFilterPlugin;
import kieker.common.configuration.Configuration;
import kieker.common.record.IMonitoringRecord;

public class LogConsumer extends AbstractFilterPlugin {

	public static final String INPUT_PORT_NAME = "newMonitoringRecord";

	public LogConsumer(final Configuration configuration, final IProjectContext projectContext) {
		super(configuration, projectContext);
	}
	
	@InputPort(name = LogConsumer.INPUT_PORT_NAME, eventTypes = { IMonitoringRecord.class })
	public void newMonitoringRecord(final Object record) {
		if (record instanceof IMonitoringRecord) {
			IMonitoringRecord monitoringRecord = (IMonitoringRecord)record;
			MemoryLogStorage.storeRecord(monitoringRecord);
		} else {
			throw new IllegalStateException("Unknown monitoring result type");
		}
	}

	@Override
	public Configuration getCurrentConfiguration() {
		return new Configuration();
	}

}
<commit_msg>debug messages<commit_after>package tools.descartes.teastore.kieker.rabbitmq;

import kieker.analysis.IProjectContext;
import kieker.analysis.plugin.annotation.InputPort;
import kieker.analysis.plugin.filter.AbstractFilterPlugin;
import kieker.common.configuration.Configuration;
import kieker.common.record.IMonitoringRecord;
import kieker.common.record.system.CPUUtilizationRecord;

public class LogConsumer extends AbstractFilterPlugin {

	public static final String INPUT_PORT_NAME = "newMonitoringRecord";

	public LogConsumer(final Configuration configuration, final IProjectContext projectContext) {
		super(configuration, projectContext);
	}
	
	@InputPort(name = LogConsumer.INPUT_PORT_NAME, eventTypes = { IMonitoringRecord.class })
	public void newMonitoringRecord(final Object record) {
		if (record instanceof IMonitoringRecord) {
			if (record instanceof CPUUtilizationRecord) {
				CPUUtilizationRecord cpu = (CPUUtilizationRecord)record;
				System.out.println(cpu.getHostname() + cpu.getTotalUtilization());
			}
			IMonitoringRecord monitoringRecord = (IMonitoringRecord)record;
			MemoryLogStorage.storeRecord(monitoringRecord);
		} else {
			throw new IllegalStateException("Unknown monitoring result type");
		}
	}

	@Override
	public Configuration getCurrentConfiguration() {
		return new Configuration();
	}

}

{'fraction_non_alphanumeric': 0.07828181453231634, 'fraction_numerical': 0.0, 'mean_word_length': 5.422680412371134, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2776446', 'n_tokens_mistral': 720, 'n_tokens_neox': 663, 'n_words': 138}