use of de.dagere.peass.config.KiekerConfig in project peass by DaGeRe.
the class TestTreeFilter method getTree.
public CallTreeNode getTree() throws IOException, XmlPullParserException, InterruptedException, FileNotFoundException, ViewNotFoundException, AnalysisConfigurationException {
final MeasurementConfig config = new MeasurementConfig(1, new ExecutionConfig(15), new KiekerConfig(true));
config.getStatisticsConfig().setOutlierFactor(18);
TreeReader executor = TreeReaderFactory.createTestTreeReader(projectFolder, config, new EnvironmentVariables());
TestCase test = new TestCase("defaultpackage.TestMe", "testMe");
// executor.executeKoPeMeKiekerRun(new TestSet(test), "1");
CallTreeNode node = executor.getTree(test, "1");
return node;
}
use of de.dagere.peass.config.KiekerConfig in project peass by DaGeRe.
the class KiekerEnvironmentPreparer method prepareKieker.
public void prepareKieker() throws IOException, InterruptedException {
final MeasurementConfig config = testTransformer.getConfig();
KiekerConfig kiekerConfig = config.getKiekerConfig();
if (kiekerConfig.isUseSourceInstrumentation() && !kiekerConfig.isOnlyOneCallRecording()) {
instrumentSources(config);
} else {
if (kiekerConfig.isEnableAdaptiveMonitoring()) {
prepareAdaptiveExecution();
}
if (kiekerConfig.isOnlyOneCallRecording()) {
generateAOPXML("de.dagere.kopeme.kieker.probe.OneCallAspectFull");
} else if (AllowedKiekerRecord.DURATION.equals(kiekerConfig.getRecord())) {
generateAOPXML(AllowedKiekerRecord.DURATION.getFullName());
} else {
generateAOPXML(AllowedKiekerRecord.OPERATIONEXECUTION.getFullName());
}
}
generateKiekerMonitoringProperties();
}
use of de.dagere.peass.config.KiekerConfig in project peass by DaGeRe.
the class TestTraceMethodReader method testTraceLengthLongFor.
@Test
public void testTraceLengthLongFor() throws ParseException, IOException {
String jarPath = getJarPath();
String agentPath = getAgentPath();
final ProcessBuilder builder = new ProcessBuilder("java", "-javaagent:" + agentPath, "-Dorg.aspectj.weaver.loadtime.configuration=file:src" + File.separator + "test" + File.separator + "resources" + File.separator + "aop.xml", "-cp", jarPath, "de.peass.example.CallerLongFor");
final Process process = builder.start();
StreamGobbler.showFullProcess(process);
final File[] kiekerFolders = tmpFolder.listFiles((FileFilter) new WildcardFileFilter("kieker-*"));
final File traceFolder = kiekerFolders[0];
final TraceMethodReader reader = new TraceMethodReader(new CalledMethodLoader(traceFolder, ModuleClassMapping.SINGLE_MODULE_MAPPING, new KiekerConfig()).getShortTrace(""), new File("src" + File.separator + "test" + File.separator + "java"));
final TraceWithMethods trace = reader.getTraceWithMethods();
System.out.println(trace.getWholeTrace());
Assert.assertEquals(7, trace.getLength());
}
use of de.dagere.peass.config.KiekerConfig in project peass by DaGeRe.
the class TestKiekerEnvironmentPreparer method testFullAopXMLGeneration.
@Test
public void testFullAopXMLGeneration() throws IOException, InterruptedException {
List<File> modules = new LinkedList<File>();
modules.add(DependencyTestConstants.CURRENT);
KiekerConfig kiekerConfig = new KiekerConfig(true);
kiekerConfig.setUseSourceInstrumentation(false);
KiekerEnvironmentPreparer kiekerEnvironmentPreparer = new KiekerEnvironmentPreparer(null, Arrays.asList("defaultpackage.NormalDependency"), new PeassFolders(DependencyTestConstants.CURRENT), new JUnitTestTransformer(DependencyTestConstants.CURRENT, new ExecutionConfig(10), kiekerConfig), modules);
kiekerEnvironmentPreparer.prepareKieker();
checkAopCorrectness();
}
Aggregations