|
|
|
@ -168,7 +168,7 @@ public class LogParserPLASMA implements LogParser{
|
|
|
|
|
/** total time needed for storing the results of an indexing - <strong>Integer</strong> */
|
|
|
|
|
public static final String INDEXED_STORE_TIME = "indexedStorageTime";
|
|
|
|
|
|
|
|
|
|
/** accumulated time needed to parse the log entries up to now */
|
|
|
|
|
/** accumulated time needed to parse the log entries up to now (in ns)*/
|
|
|
|
|
public static final String TOTAL_PARSER_TIME = "totalParserTime";
|
|
|
|
|
|
|
|
|
|
/** times the parser was called, respectively amount of independant log-lines */
|
|
|
|
@ -251,7 +251,7 @@ public class LogParserPLASMA implements LogParser{
|
|
|
|
|
private int totalParserRuns = 0;
|
|
|
|
|
|
|
|
|
|
public int parse(String logLevel, String logLine) {
|
|
|
|
|
long start = System.currentTimeMillis();
|
|
|
|
|
long start = System.nanoTime();
|
|
|
|
|
if (logLevel.equals("INFO")){
|
|
|
|
|
m = i1.matcher (logLine);
|
|
|
|
|
|
|
|
|
@ -260,6 +260,8 @@ public class LogParserPLASMA implements LogParser{
|
|
|
|
|
urlSum += Integer.parseInt(m.group(1));
|
|
|
|
|
urlTimeSum += Integer.parseInt(m.group(2));
|
|
|
|
|
blockedURLSum += Integer.parseInt(m.group(3));
|
|
|
|
|
totalParserTime += (System.nanoTime() - start);
|
|
|
|
|
totalParserRuns++;
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
m = i2.matcher (logLine);
|
|
|
|
@ -270,6 +272,8 @@ public class LogParserPLASMA implements LogParser{
|
|
|
|
|
rwiTimeSum += Integer.parseInt(m.group(3));
|
|
|
|
|
urlReqSum += Integer.parseInt(m.group(4));
|
|
|
|
|
blockedRWISum += Integer.parseInt(m.group(6));
|
|
|
|
|
totalParserTime += (System.nanoTime() - start);
|
|
|
|
|
totalParserRuns++;
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
m = i2_2.matcher (logLine);
|
|
|
|
@ -280,6 +284,8 @@ public class LogParserPLASMA implements LogParser{
|
|
|
|
|
rwiTimeSum += Integer.parseInt(m.group(3));
|
|
|
|
|
urlReqSum += Integer.parseInt(m.group(4));
|
|
|
|
|
blockedRWISum += Integer.parseInt(m.group(6));
|
|
|
|
|
totalParserTime += (System.nanoTime() - start);
|
|
|
|
|
totalParserRuns++;
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
m = i3.matcher (logLine);
|
|
|
|
@ -288,6 +294,8 @@ public class LogParserPLASMA implements LogParser{
|
|
|
|
|
DHTSendTraffic += Integer.parseInt(m.group(6));
|
|
|
|
|
DHTPeerNames.add(m.group(2));
|
|
|
|
|
DHTPeerHashs.add(m.group(3));
|
|
|
|
|
totalParserTime += (System.nanoTime() - start);
|
|
|
|
|
totalParserRuns++;
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
m = i4.matcher (logLine);
|
|
|
|
@ -297,6 +305,8 @@ public class LogParserPLASMA implements LogParser{
|
|
|
|
|
DHTSendURLs += Integer.parseInt(m.group(3));
|
|
|
|
|
DHTPeerNames.add(m.group(4));
|
|
|
|
|
DHTPeerHashs.add(m.group(5));
|
|
|
|
|
totalParserTime += (System.nanoTime() - start);
|
|
|
|
|
totalParserRuns++;
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
m = i5.matcher (logLine);
|
|
|
|
@ -306,6 +316,8 @@ public class LogParserPLASMA implements LogParser{
|
|
|
|
|
maxDHTDist = Math.max(maxDHTDist, Double.parseDouble(m.group(3)));
|
|
|
|
|
avgDHTDist += Double.parseDouble(m.group(3));
|
|
|
|
|
DHTSelectionTargetCount++;
|
|
|
|
|
totalParserTime += (System.nanoTime() - start);
|
|
|
|
|
totalParserRuns++;
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
m = i6.matcher (logLine);
|
|
|
|
@ -314,11 +326,15 @@ public class LogParserPLASMA implements LogParser{
|
|
|
|
|
RWIRejectPeerNames.add(m.group(2));
|
|
|
|
|
RWIRejectPeerHashs.add(m.group(1));
|
|
|
|
|
RWIRejectCount++;
|
|
|
|
|
totalParserTime += (System.nanoTime() - start);
|
|
|
|
|
totalParserRuns++;
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
m = i7.matcher (logLine);
|
|
|
|
|
|
|
|
|
|
if (m.find ()) {
|
|
|
|
|
totalParserTime += (System.nanoTime() - start);
|
|
|
|
|
totalParserRuns++;
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
m = i8.matcher (logLine);
|
|
|
|
@ -326,6 +342,8 @@ public class LogParserPLASMA implements LogParser{
|
|
|
|
|
if (m.find ()) {
|
|
|
|
|
DHTSelectionWordsCount += Double.parseDouble(m.group(1));
|
|
|
|
|
DHTSelectionWordsTimeCount += Double.parseDouble(m.group(2));
|
|
|
|
|
totalParserTime += (System.nanoTime() - start);
|
|
|
|
|
totalParserRuns++;
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
m = i9.matcher (logLine);
|
|
|
|
@ -333,18 +351,24 @@ public class LogParserPLASMA implements LogParser{
|
|
|
|
|
if (m.find ()) {
|
|
|
|
|
rankingDistributionCount++;
|
|
|
|
|
rankingDistributionTime += Integer.parseInt(m.group(1));
|
|
|
|
|
totalParserTime += (System.nanoTime() - start);
|
|
|
|
|
totalParserRuns++;
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
m = i10.matcher (logLine);
|
|
|
|
|
|
|
|
|
|
if (m.find ()) {
|
|
|
|
|
rankingDistributionFailCount++;
|
|
|
|
|
totalParserTime += (System.nanoTime() - start);
|
|
|
|
|
totalParserRuns++;
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
m = i11.matcher (logLine);
|
|
|
|
|
|
|
|
|
|
if (m.find ()) {
|
|
|
|
|
busyPeerCount++;
|
|
|
|
|
totalParserTime += (System.nanoTime() - start);
|
|
|
|
|
totalParserRuns++;
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
// m = i12.matcher (logLine);
|
|
|
|
@ -355,6 +379,8 @@ public class LogParserPLASMA implements LogParser{
|
|
|
|
|
m = i13.matcher (logLine);
|
|
|
|
|
|
|
|
|
|
if (m.find ()) {
|
|
|
|
|
totalParserTime += (System.nanoTime() - start);
|
|
|
|
|
totalParserRuns++;
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
m = adv1.matcher (logLine);
|
|
|
|
@ -368,6 +394,9 @@ public class LogParserPLASMA implements LogParser{
|
|
|
|
|
indexedParsingTime += Integer.parseInt(m.group(8));
|
|
|
|
|
indexedIndexingTime += Integer.parseInt(m.group(9));
|
|
|
|
|
indexedStorageTime += Integer.parseInt(m.group(10));
|
|
|
|
|
totalParserTime += (System.nanoTime() - start);
|
|
|
|
|
totalParserRuns++;
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} else if (logLevel.equals("WARNING")){
|
|
|
|
@ -375,12 +404,16 @@ public class LogParserPLASMA implements LogParser{
|
|
|
|
|
|
|
|
|
|
if (m.find ()) {
|
|
|
|
|
notEnoughDHTPeers++;
|
|
|
|
|
totalParserTime += (System.nanoTime() - start);
|
|
|
|
|
totalParserRuns++;
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
m = w2.matcher (logLine);
|
|
|
|
|
|
|
|
|
|
if (m.find ()) {
|
|
|
|
|
failedIndexDistributionCount++;
|
|
|
|
|
totalParserTime += (System.nanoTime() - start);
|
|
|
|
|
totalParserRuns++;
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
} else if (logLevel.equals("SEVERE")){
|
|
|
|
@ -389,16 +422,20 @@ public class LogParserPLASMA implements LogParser{
|
|
|
|
|
if (m.find ()) {
|
|
|
|
|
if (m.group(1).equals("leftchild")) leftChildTwiceCount++;
|
|
|
|
|
else if (m.group(1).equals("rightchild")) rightChildTwiceCount++;
|
|
|
|
|
totalParserTime += (System.nanoTime() - start);
|
|
|
|
|
totalParserRuns++;
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
m = e2.matcher (logLine);
|
|
|
|
|
|
|
|
|
|
if (m.find ()) {
|
|
|
|
|
malformedURLCount++;
|
|
|
|
|
totalParserTime += (System.nanoTime() - start);
|
|
|
|
|
totalParserRuns++;
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
totalParserTime += (System.currentTimeMillis() - start);
|
|
|
|
|
totalParserTime += (System.nanoTime() - start);
|
|
|
|
|
totalParserRuns++;
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|