[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r15206: Changed parsing script for request and response times so tha (projects/hidserv/trunk)
Author: kloesing
Date: 2008-06-13 08:35:07 -0400 (Fri, 13 Jun 2008)
New Revision: 15206
Modified:
projects/hidserv/trunk/LogFileParser.java
Log:
Changed parsing script for request and response times so that each line contains a single transfer time and corresponding test ID and message ID.
Modified: projects/hidserv/trunk/LogFileParser.java
===================================================================
--- projects/hidserv/trunk/LogFileParser.java 2008-06-13 11:44:32 UTC (rev 15205)
+++ projects/hidserv/trunk/LogFileParser.java 2008-06-13 12:35:07 UTC (rev 15206)
@@ -8,7 +8,6 @@
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
-import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.SortedMap;
@@ -141,18 +140,19 @@
outputDirectory.getAbsolutePath() + File.separatorChar
+ "reqtimes.csv", false));
bw.write("# testid contains a unique test identifier that matches "
- + "with the identifiers \n# used in the other output "
- + "files, reqtimes are the times in millis that it \n# "
- + "takes to send a request from client to server.\n");
- bw.write("testid,reqtimes...\n");
+ + "with the\n# identifiers used in the other output "
+ + "files, msgid is the message number,\n# and reqtime is "
+ + "the time in millis that it takes to send a request "
+ + "from\n# client to server.\n");
+ bw.write("testid,msgid,reqtime\n");
for (Map.Entry<String, PuppeTorEvent> e : puppeTorEvents.entrySet()) {
- bw.write(e.getKey());
PuppeTorEvent event = e.getValue();
if (!event.receivedRequest.isEmpty()
&& !event.sendingRequest.isEmpty()) {
int last = Math.min(event.receivedRequest.lastKey(),
event.sendingRequest.lastKey());
for (int i = 0; i <= last; i++) {
+ bw.write(e.getKey() + "," + i);
if (event.sendingRequest.containsKey(i)
&& event.receivedRequest.containsKey(i)) {
long reqtime = event.receivedRequest.get(i)
@@ -163,9 +163,9 @@
} else {
bw.write(",NA");
}
+ bw.write("\n");
}
}
- bw.write("\n");
}
bw.close();
} catch (IOException e) {
@@ -179,18 +179,19 @@
outputDirectory.getAbsolutePath() + File.separatorChar
+ "restimes.csv", false));
bw.write("# testid contains a unique test identifier that matches "
- + "with the identifiers \n# used in the other output "
- + "files, restimes are the times in millis that it \n# "
- + "takes to send a response from server to client.\n");
- bw.write("testid,restimes...\n");
+ + "with the\n# identifiers used in the other output "
+ + "files, msgid is the message number,\n# and restime is "
+ + "the time in millis that it takes to send a response "
+ + "from\n# server to client.\n");
+ bw.write("testid,msgid,restime\n");
for (Map.Entry<String, PuppeTorEvent> e : puppeTorEvents.entrySet()) {
- bw.write(e.getKey());
PuppeTorEvent event = e.getValue();
if (!event.receivedRequest.isEmpty()
&& !event.receivedResponse.isEmpty()) {
int last = Math.min(event.receivedRequest.lastKey(),
event.receivedResponse.lastKey());
for (int i = 0; i <= last; i++) {
+ bw.write(e.getKey() + "," + i);
if (event.receivedResponse.containsKey(i)
&& event.receivedRequest.containsKey(i)) {
long restime = event.receivedResponse.get(i)
@@ -201,9 +202,9 @@
} else {
bw.write(",NA");
}
+ bw.write("\n");
}
}
- bw.write("\n");
}
bw.close();
} catch (IOException e) {