Commit 70e45e92 authored by Simon Eismann's avatar Simon Eismann

Response time logging now logs start and stop times

parent 0175736d
......@@ -525,7 +525,7 @@ public class Place extends Node {
for (int i = 0; i < count; i++) {
arrivTS = (Double) tokArrivTS[color].removeFirst();
placeStats.updateSojTimeStats(color,
clock - arrivTS.doubleValue(), configuration);
arrivTS.doubleValue(), clock, configuration);
}
}
}
......
......@@ -434,7 +434,7 @@ public class QPlace extends Place {
queueTokenPop[token.color], -1, executor.getClock());
if (statsLevel >= 3)
qPlaceQueueStats.updateSojTimeStats(token.color,
executor.getClock() - token.arrivTS,
token.arrivTS, executor.getClock(),
executor.getConfiguration());
}
......
......@@ -442,8 +442,7 @@ public class Transition extends Node {
continue;
probe.probeStats.updateSojTimeStats(c,
executor.getClock()
- curStamp.timestamp,
curStamp.timestamp, executor.getClock(),
executor.getConfiguration());
}
}
......@@ -550,11 +549,7 @@ public class Transition extends Node {
break;
case PROBE_ACTION_END_ON_ENTRY:
case PROBE_ACTION_START_ON_EXIT_AND_END_ON_ENTRY:
probe.probeStats.updateSojTimeStats(c,
executorOut.getClock() // TODO check
// which
// executor
- timestamp.timestamp,
probe.probeStats.updateSojTimeStats(c, timestamp.timestamp, executorOut.getClock(),
executorOut.getConfiguration());
break;
default:
......
......@@ -145,7 +145,7 @@ public class FCFSQueue extends Queue {
n++;
// Update Stats
if (queuingPlace.statsLevel >= 3) {
queuingPlace.qPlaceQueueStats.updateDelayTimeStats(color, 0,
queuingPlace.qPlaceQueueStats.updateDelayTimeStats(color, executor.getClock(), executor.getClock(),
executor.getConfiguration());
}
}
......@@ -175,8 +175,7 @@ public class FCFSQueue extends Queue {
// Update stats
if (queuingPlace.statsLevel >= 3)
queuingPlace.qPlaceQueueStats.updateDelayTimeStats(
nextToken.color, executor.getClock()
- nextToken.arrivTS,
nextToken.color, nextToken.arrivTS, executor.getClock(),
executor.getConfiguration());
} else {
numBusyServers--;
......
......@@ -100,7 +100,7 @@ public class PRIOQueue extends Queue {
n++;
// Update Stats
if (queueingPlace.statsLevel >= 3)
queueingPlace.qPlaceQueueStats.updateDelayTimeStats(color, 0,
queueingPlace.qPlaceQueueStats.updateDelayTimeStats(color, executor.getClock(), executor.getClock(),
executor.getConfiguration());
}
while (n < count) {
......@@ -141,7 +141,7 @@ public class PRIOQueue extends Queue {
// Update stats
if (qPl.statsLevel >= 3) {
qPl.qPlaceQueueStats.updateDelayTimeStats(tk.color,
executor.getClock() - tk.arrivTS,
tk.arrivTS, executor.getClock(),
executor.getConfiguration());
}
} else {
......
......@@ -124,7 +124,7 @@ public class RANDOMQueue extends Queue {
n++;
// Update Stats
if (qPl.statsLevel >= 3) {
qPl.qPlaceQueueStats.updateDelayTimeStats(color, 0,
qPl.qPlaceQueueStats.updateDelayTimeStats(color, executor.getClock(), executor.getClock(),
executor.getConfiguration());
}
}
......@@ -154,7 +154,7 @@ public class RANDOMQueue extends Queue {
// Update stats
if (qPl.statsLevel >= 3) {
qPl.qPlaceQueueStats.updateDelayTimeStats(tk.color,
executor.getClock() - tk.arrivTS,
tk.arrivTS, executor.getClock(),
executor.getConfiguration());
}
} else {
......
......@@ -431,10 +431,13 @@ public class PlaceStats extends Stats implements java.io.Serializable {
/**
* Method updateSojTimeStats
*
* @param color - token color
* @param sojTime - sojourn time of token in place
* @param color - token color
* @param sojTime - sojourn time of token in place
* @param clock
*/
public void updateSojTimeStats(int color, double sojTime, SimQPNConfiguration configuration) throws SimQPNException {
public void updateSojTimeStats(int color, double start, double stop, SimQPNConfiguration configuration)
throws SimQPNException {
double sojTime = stop - start;
if (configuration.getAnalMethod() == SimQPNConfiguration.AnalysisMethod.WELCH) {
if (maxObsrvST[color] <= 0) return; // Do not consider colors with nonpositive maxObsrvST
int numObsrv = obsrvST[color].size();
......@@ -494,7 +497,7 @@ public class PlaceStats extends Stats implements java.io.Serializable {
histST[color].addEntry(sojTime);
if (statsLevel >= 5)
fileST[color].println(sojTime);
fileST[color].println(sojTime + "," + start + "," + stop);
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment