Index: TestHarness4LAMS2/template.html =================================================================== RCS file: /usr/local/cvsroot/TestHarness4LAMS2/template.html,v diff -u -r1.1 -r1.2 --- TestHarness4LAMS2/template.html 11 Aug 2006 06:49:30 -0000 1.1 +++ TestHarness4LAMS2/template.html 20 Oct 2008 23:08:31 -0000 1.2 @@ -52,6 +52,8 @@ and ${testSuite.learnerTest.countAborted} learner(s) aborted.

+
  • Total response time: ${totalResponseTime} seconds +
  • Average response time: ${averageResponseTime} seconds Index: TestHarness4LAMS2/src/org/lamsfoundation/testharness/TestReporter.java =================================================================== RCS file: /usr/local/cvsroot/TestHarness4LAMS2/src/org/lamsfoundation/testharness/TestReporter.java,v diff -u -r1.5 -r1.6 --- TestHarness4LAMS2/src/org/lamsfoundation/testharness/TestReporter.java 17 Sep 2006 06:09:25 -0000 1.5 +++ TestHarness4LAMS2/src/org/lamsfoundation/testharness/TestReporter.java 20 Oct 2008 23:08:31 -0000 1.6 @@ -221,6 +221,16 @@ context.put("callRecords", callRecords); context.put("testSuites", testSuites); context.put("time", new SimpleDateFormat("HH:mm:ss dd MMM yyyy").format(new Date())); + long total = 0; + long count = 0; + for (CallRecord r : callRecords) { + if (r.getHttpStatusCode() != null && r.getHttpStatusCode().equals(new Integer("200"))) { + total += r.getTimeInMillis(); + count++; + } + } + context.put("totalResponseTime", total/1000.0); + context.put("averageResponseTime", total/1000.0/count); } static String load() throws IOException {