Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuergen Haug2018-07-18 13:19:40 -0400
committerJuergen Haug2018-07-18 13:19:40 -0400
commit33e12d15db7f984eae3350d992c797e85362c9ed (patch)
treeabbcf46bc4630f3c03b593a77e0d8807aaea9ff6 /runtime/org.eclipse.etrice.runtime.java/src/org/eclipse
parentc33073c10865923d47f00981b04169929f32bcd9 (diff)
downloadorg.eclipse.etrice-33e12d15db7f984eae3350d992c797e85362c9ed.tar.gz
org.eclipse.etrice-33e12d15db7f984eae3350d992c797e85362c9ed.tar.xz
org.eclipse.etrice-33e12d15db7f984eae3350d992c797e85362c9ed.zip
[etUnit] fixed test case timing for java
Diffstat (limited to 'runtime/org.eclipse.etrice.runtime.java/src/org/eclipse')
-rw-r--r--runtime/org.eclipse.etrice.runtime.java/src/org/eclipse/etrice/runtime/java/etunit/EtUnit.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/org.eclipse.etrice.runtime.java/src/org/eclipse/etrice/runtime/java/etunit/EtUnit.java b/runtime/org.eclipse.etrice.runtime.java/src/org/eclipse/etrice/runtime/java/etunit/EtUnit.java
index a35241119..e8cabfe51 100644
--- a/runtime/org.eclipse.etrice.runtime.java/src/org/eclipse/etrice/runtime/java/etunit/EtUnit.java
+++ b/runtime/org.eclipse.etrice.runtime.java/src/org/eclipse/etrice/runtime/java/etunit/EtUnit.java
@@ -37,6 +37,7 @@ public class EtUnit {
private static BufferedWriter out = null;
private static long etUnit_startTime;
+ private static long etUnit_lastTestCaseTime;
private static int etUnit_nextCaseId = 1;
private static HashSet<Integer> failed = new HashSet<Integer>();
private static HashMap<Integer, OrderInfo> orderInfo = new HashMap<Integer, OrderInfo>();
@@ -105,14 +106,13 @@ public class EtUnit {
} catch (IOException e) {
e.printStackTrace();
}
+ etUnit_lastTestCaseTime = System.currentTimeMillis();
}
return caseId;
}
public static void etUnit_closeTestCase(int id) {
- long time = System.currentTimeMillis() - etUnit_startTime;
-
OrderInfo info = orderInfo.get(id);
if (info!=null) {
if (info.current != info.list.length) {
@@ -121,6 +121,7 @@ public class EtUnit {
}
if (out!=null) {
+ long time = System.currentTimeMillis() - etUnit_lastTestCaseTime;
try {
out.write("tc end "+id+": "+time+"\n");
out.flush();

Back to the top