<commit_before>package de.isys.jawap.collector.instrument;

import de.isys.jawap.collector.model.MethodCallStats;
import de.isys.jawap.collector.profile.Profiler;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;

@Aspect
public abstract class PerformanceMonitorAspect {

	@Pointcut
	public abstract void methodsToProfile();

	@Pointcut("within(de.isys.jawap.collector..*)")
	public void jawapCollector() {
	}

	@Around("methodsToProfile() && !jawapCollector()")
	public Object profile(ProceedingJoinPoint pPjp) throws Throwable {
		System.out.println("> entering " + pPjp.getSignature().toShortString() + pPjp.getSourceLocation());
		MethodCallStats parent = Profiler.getMethodCallParent();
		if (parent != null) {
			MethodCallStats stats = Profiler.start(parent);
			try {
				return pPjp.proceed();
			} finally {
				System.out.println("< leaving  " + pPjp.getSignature().toShortString());

				Profiler.stop(stats, pPjp.getSignature().getDeclaringTypeName(), pPjp.getSignature().getName());
			}
		}
		return pPjp.proceed();
	}

}<commit_msg>removed test logging code to aspect<commit_after>package de.isys.jawap.collector.instrument;

import de.isys.jawap.collector.model.MethodCallStats;
import de.isys.jawap.collector.profile.Profiler;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;

@Aspect
public abstract class PerformanceMonitorAspect {

	@Pointcut
	public abstract void methodsToProfile();

	@Pointcut("within(de.isys.jawap.collector..*)")
	public void jawapCollector() {
	}

	@Around("methodsToProfile() && !jawapCollector()")
	public Object profile(ProceedingJoinPoint pPjp) throws Throwable {
		MethodCallStats parent = Profiler.getMethodCallParent();
		if (parent != null) {
			MethodCallStats stats = Profiler.start(parent);
			try {
				return pPjp.proceed();
			} finally {
				Profiler.stop(stats, pPjp.getSignature().getDeclaringTypeName(), pPjp.getSignature().getName());
			}
		}
		return pPjp.proceed();
	}

}
{'fraction_non_alphanumeric': 0.12968036529680366, 'fraction_numerical': 0.0, 'mean_word_length': 5.387755102040816, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '6725435', 'n_tokens_mistral': 795, 'n_tokens_neox': 732, 'n_words': 120}