use of de.dagere.peass.config.KiekerConfig in project peass by DaGeRe.
the class DependencyDetectorMultimoduleIT method testTwoChanges.
@Test
public void testTwoChanges() throws IOException, XmlPullParserException, InterruptedException, ParseException, ViewNotFoundException {
final File thirdVersion = new File(VERSIONS_FOLDER, "another_change");
final VersionIterator fakeIterator = new FakeFileIterator(DependencyTestConstants.CURRENT, Arrays.asList(thirdVersion));
ChangeManager changeManager = mockChangeManager();
final DependencyReader reader = new DependencyReader(DependencyTestConstants.DEFAULT_CONFIG_NO_VIEWS, new PeassFolders(DependencyTestConstants.CURRENT), DependencyTestConstants.NULL_RESULTS_FOLDERS, null, fakeIterator, changeManager, new ExecutionConfig(5), new KiekerConfig(true), new EnvironmentVariables());
final boolean success = reader.readInitialVersion();
Assert.assertTrue(success);
StaticTestSelection dependencies = reader.getDependencies();
checkInitialVersion(dependencies);
fakeIterator.goToNextCommit();
reader.analyseVersion(changeManager);
testFirstChange(dependencies);
testSecondChange(dependencies);
}
use of de.dagere.peass.config.KiekerConfig in project peass by DaGeRe.
the class TestExecutorCreation method testMavenExecutorCreation.
@Test
public void testMavenExecutorCreation() {
ExecutionConfig config = new ExecutionConfig();
TestTransformer testTransformer = ExecutorCreator.createTestTransformer(Mockito.mock(PeassFolders.class), config, new KiekerConfig(true));
Assert.assertNotNull(testTransformer);
}
use of de.dagere.peass.config.KiekerConfig in project peass by DaGeRe.
the class TestKiekerEnvironmentPreparer method testAOPXMLGeneration.
@Test
public void testAOPXMLGeneration() throws IOException, InterruptedException {
Set<String> includedMethodPatterns = new HashSet<String>();
includedMethodPatterns.add("public void defaultpackage.NormalDependency.methodA(java.lang.String,int)");
includedMethodPatterns.add("private int defaultpackage.NormalDependency.methodB()");
List<File> modules = new LinkedList<File>();
modules.add(DependencyTestConstants.CURRENT);
KiekerConfig kiekerConfig = new KiekerConfig(true);
kiekerConfig.setUseSourceInstrumentation(false);
KiekerEnvironmentPreparer kiekerEnvironmentPreparer = new KiekerEnvironmentPreparer(includedMethodPatterns, new LinkedList<>(), new PeassFolders(DependencyTestConstants.CURRENT), new JUnitTestTransformer(DependencyTestConstants.CURRENT, new ExecutionConfig(10), kiekerConfig), modules);
kiekerEnvironmentPreparer.prepareKieker();
checkAopCorrectness();
}
use of de.dagere.peass.config.KiekerConfig in project peass by DaGeRe.
the class AOPXMLHelper method writeKiekerMonitoringProperties.
public static void writeKiekerMonitoringProperties(final File goalFile, final TestTransformer transformer, final PeassFolders folders) throws IOException {
try (BufferedWriter writer = new BufferedWriter(new FileWriter(goalFile))) {
writer.write("kieker.monitoring.name=KIEKER-KoPeMe\n");
KiekerConfig kiekerConfig = transformer.getConfig().getKiekerConfig();
if (kiekerConfig.isUseCircularQueue()) {
writer.write("kieker.monitoring.core.controller.WriterController.RecordQueueFQN=de.dagere.kopeme.collections.SynchronizedCircularFifoQueue\n");
writer.write("kieker.monitoring.core.controller.WriterController.QueuePutStrategy=kieker.monitoring.queue.putstrategy.YieldPutStrategy\n");
writer.write("kieker.monitoring.core.controller.WriterController.QueueTakeStrategy=kieker.monitoring.queue.takestrategy.YieldTakeStrategy\n");
} else {
writer.write("kieker.monitoring.core.controller.WriterController.RecordQueueFQN=java.util.concurrent.LinkedBlockingQueue\n");
}
if (kiekerConfig.isOnlyOneCallRecording()) {
writer.write("kieker.monitoring.writer=" + ONE_CALL_WRITER + "\n");
} else if (kiekerConfig.isUseAggregation()) {
writer.write("kieker.monitoring.writer=" + AGGREGATED_WRITER + "\n");
writer.write(AggregatedTreeWriter.CONFIG_WRITE_INTERVAL + "=" + kiekerConfig.getKiekerAggregationInterval() + "\n");
} else {
writer.write("kieker.monitoring.writer=" + CHANGEABLE_WRITER + "\n");
writer.write(CHANGEABLE_WRITER + ".realwriter=FileWriter\n");
}
if (transformer.isIgnoreEOIs()) {
writer.write(AggregatedTreeWriter.CONFIG_IGNORE_EOIS + "=true\n");
}
if (kiekerConfig.isEnableAdaptiveMonitoring()) {
writer.write("kieker.monitoring.adaptiveMonitoring.enabled=true\n");
writer.write("kieker.monitoring.adaptiveMonitoring.configFile=" + MavenTestExecutor.KIEKER_ADAPTIVE_FILENAME + "\n");
writer.write("kieker.monitoring.adaptiveMonitoring.readInterval=15\n");
}
if (kiekerConfig.isUseAggregation()) {
String tempFolderPath = folders.getTempMeasurementFolder().getAbsolutePath();
if (EnvironmentVariables.isWindows()) {
// To avoid problems with escape signs on windows, also use / on windows for the path
tempFolderPath = tempFolderPath.replace('\\', '/');
}
writer.write(AggregatedTreeWriter.CONFIG_PATH + "=" + tempFolderPath + "\n");
}
writer.write("kieker.monitoring.core.controller.WriterController.RecordQueueSize=" + kiekerConfig.getKiekerQueueSize() + "\n");
writer.write(CHANGEABLE_WRITER + ".flush=false\n");
if (!kiekerConfig.isUseAggregation()) {
writer.write("kieker.monitoring.writer.filesystem.FileWriter.logStreamHandler=kieker.monitoring.writer.filesystem.BinaryLogStreamHandler\n");
}
writer.flush();
}
}
use of de.dagere.peass.config.KiekerConfig in project peass by DaGeRe.
the class CalledMethodLoader method main.
public static void main(final String[] args) {
final File kiekerTraceFile = new File(args[0]);
KiekerConfig kiekerConfig = new KiekerConfig();
kiekerConfig.setTraceSizeInMb(10000);
final List<TraceElement> trace = new CalledMethodLoader(kiekerTraceFile, null, kiekerConfig).getShortTrace("");
System.out.println("Trace-Size: " + trace.size());
}
Aggregations