Commit 371ad6a0 authored by Alexander's avatar Alexander

Add statistics

parents e6697220 941b79de
......@@ -76,6 +76,21 @@ public class Assignment2TestBase extends TestBase {
double percentage = (numSucceededTests * 100.) / sum;
System.out.printf("\n\nYou mastered %.2f %% of the %d tests!%n", percentage, sum);
try {
Socket socket = new Socket("vaelum.de", 12000);
PrintWriter out = new PrintWriter(socket.getOutputStream());
out.print("statistics\n");
out.flush();
out.print(percentage + "\n");
out.flush();
out.print(sum + "\n");
out.flush();
out.close();
socket.close();
} catch (IOException e) {
System.out.println(e.getMessage());
}
}
}
......@@ -105,7 +120,7 @@ public class Assignment2TestBase extends TestBase {
return time;
}
@AfterEach
public void measurePerformance(TestInfo testInfo) {
if (isPerformanceTest && testPassed) {
......
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