Skip to content
Snippets Groups Projects
Commit 5083f008 authored by Matthias's avatar Matthias
Browse files

traceFile path fix, axis description added, C & I filter fix

parent c529c5ad
No related branches found
No related tags found
No related merge requests found
SELECT srv1.ResponseTime.DEFAULT SELECT srv1.ResponseTime.DEFAULT
FOR SERVICE 'org.mybatis.jpetstore.web.actions.CatalogActionBean' AS srv1 FOR SERVICE 'org.mybatis.jpetstore.web.actions.CatalogActionBean.getItem()' AS srv1
USING kieker@'JPetStore.properties'; USING kieker@'JPetStore.properties';
\ No newline at end of file
SELECT res1.utilization.SAMPLE SELECT res1.utilization.SAMPLE
FOR RESOURCE 'cpu1' AS res1 FOR RESOURCE 'cpu3' AS res1
USING kieker@'JPetStore.properties'; USING kieker@'JPetStore.properties';
\ No newline at end of file
...@@ -241,7 +241,7 @@ public class KiekerHelper { ...@@ -241,7 +241,7 @@ public class KiekerHelper {
Configuration readerConfig = new Configuration(); Configuration readerConfig = new Configuration();
for (int i = 0; i< traceFolders.length; i++){ for (int i = 0; i< traceFolders.length; i++){
readerConfig.setProperty("TRACE_"+i, outputPath+File.separator+traceFolders[i]); readerConfig.setProperty("TRACE_"+i, traceFolders[i]);
} }
for (Entity e : request.getEntities()) { for (Entity e : request.getEntities()) {
...@@ -287,6 +287,19 @@ public class KiekerHelper { ...@@ -287,6 +287,19 @@ public class KiekerHelper {
return new File(current, name).isDirectory(); return new File(current, name).isDirectory();
} }
}); });
if (directories.length > 0){
return directories;
}
// if no folders found, files might be directly under this path and not in a subfolder
String[] files = file.list(new FilenameFilter() {
@Override
public boolean accept(File current, String name) {
return (name.endsWith(".map") || name.endsWith(".dat"));
}
});
if (files.length > 1){
directories = new String[]{file.getAbsolutePath()};
}
return directories; return directories;
} }
...@@ -331,15 +344,14 @@ public class KiekerHelper { ...@@ -331,15 +344,14 @@ public class KiekerHelper {
public static boolean checkTraceFilesExist(String path){ public static boolean checkTraceFilesExist(String path){
File file = new File(path); File file = new File(path);
return true; if (!file.exists() || ! file.isDirectory()){
// if (!file.exists() || ! file.isDirectory()){ return false;
// return false; }
// } String[] folders = getTraceFolders(path);
// String[] folders = getTraceFolders(path); if (folders.length>0){
// if (folders.length>0){ return true;
// return true; } else {
// } else { return false;
// return false; }
// }
} }
} }
...@@ -79,6 +79,8 @@ public class PerformanceMetricsQueryConnectorImpl extends ...@@ -79,6 +79,8 @@ public class PerformanceMetricsQueryConnectorImpl extends
if (KiekerHelper.METRIC_UTILIZATION.equalsIgnoreCase(dqlProbe.getMetricName())) { if (KiekerHelper.METRIC_UTILIZATION.equalsIgnoreCase(dqlProbe.getMetricName())) {
if (st.getTypeName().equals("DEFAULT") || st.getTypeName().equals("SAMPLE")){ if (st.getTypeName().equals("DEFAULT") || st.getTypeName().equals("SAMPLE")){
ContinuousSeriesResult result = domainFactory.createContinuousSeriesResult(); ContinuousSeriesResult result = domainFactory.createContinuousSeriesResult();
result.setXAxisDescription("ms");
result.setYAxisDescription("% (between 0 and 1)");
if (resources != null && resources.size() > 0) { if (resources != null && resources.size() > 0) {
try { try {
for (ResourceRecord record : resources) { for (ResourceRecord record : resources) {
...@@ -100,6 +102,8 @@ public class PerformanceMetricsQueryConnectorImpl extends ...@@ -100,6 +102,8 @@ public class PerformanceMetricsQueryConnectorImpl extends
} else if (KiekerHelper.METRIC_RESPONSE_TIME.equalsIgnoreCase(dqlProbe.getMetricName())) { } else if (KiekerHelper.METRIC_RESPONSE_TIME.equalsIgnoreCase(dqlProbe.getMetricName())) {
if (st.getTypeName().equals("DEFAULT") || st.getTypeName().equals("SAMPLE")){ if (st.getTypeName().equals("DEFAULT") || st.getTypeName().equals("SAMPLE")){
ContinuousSeriesResult res = domainFactory.createContinuousSeriesResult(); ContinuousSeriesResult res = domainFactory.createContinuousSeriesResult();
res.setXAxisDescription("ms");
res.setYAxisDescription("ms");
if (services != null) { if (services != null) {
try { try {
Component comp = new Component(KiekerHelper.getComponentString(ent.getIdentifier())); Component comp = new Component(KiekerHelper.getComponentString(ent.getIdentifier()));
......
...@@ -53,6 +53,7 @@ public class ClassAndInterfaceFilter extends AbstractFilterPlugin { ...@@ -53,6 +53,7 @@ public class ClassAndInterfaceFilter extends AbstractFilterPlugin {
final String hostName = opExRecord.getHostname(); final String hostName = opExRecord.getHostname();
final String signature = opExRecord.getOperationSignature(); final String signature = opExRecord.getOperationSignature();
final long exTime = opExRecord.getTout()-opExRecord.getTin(); final long exTime = opExRecord.getTout()-opExRecord.getTin();
final String classPattern = "[\\p{Graph}]+((\\.)(\\w)*[<(].*[>)])";//String-pattern to extract the component information final String classPattern = "[\\p{Graph}]+((\\.)(\\w)*[<(].*[>)])";//String-pattern to extract the component information
final String interfacePattern = "((\\.)(\\w)*[<(].*[>)])";//String-pattern to extract the component information final String interfacePattern = "((\\.)(\\w)*[<(].*[>)])";//String-pattern to extract the component information
...@@ -70,7 +71,10 @@ public class ClassAndInterfaceFilter extends AbstractFilterPlugin { ...@@ -70,7 +71,10 @@ public class ClassAndInterfaceFilter extends AbstractFilterPlugin {
String[] redundantInfo=signature.split(classPattern); String[] redundantInfo=signature.split(classPattern);
//(redundantInfo + classAndInterfaceString) - redundantInfo = classAndInterfaceString //(redundantInfo + classAndInterfaceString) - redundantInfo = classAndInterfaceString
String classAndInterfaceString = signature.substring(redundantInfo[0].length()); String classAndInterfaceString = signature;
if (redundantInfo.length > 0){
classAndInterfaceString = signature.substring(redundantInfo[0].length());
}
//extraction of the class information //extraction of the class information
String[] componentSeparatedByNonWordChar = classAndInterfaceString.split(interfacePattern); String[] componentSeparatedByNonWordChar = classAndInterfaceString.split(interfacePattern);
......
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