more stuff for testing

This commit is contained in:
2020-06-19 08:58:03 +02:00
parent e58cac4bb4
commit 54bcf02c9f
2 changed files with 8 additions and 2 deletions
@@ -46,7 +46,11 @@ public class GpuTestSystem {
public void run() {
List<Task> tasks = getTasks();
GpuEventBus.INSTANCE.post(() -> tasks);
try {
Thread.sleep(90000);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
GpuEventBus.INSTANCE.stopListening();
LOG.info("Running tasks so dlls get loaded");
muteLogger();
@@ -54,6 +58,8 @@ public class GpuTestSystem {
// run tasks for the first time to load dlls and initialize everything
tasks.stream().peek(t -> System.out.println("starting " + t.getClass().getSimpleName())).forEach(Task::runTask);
tasks.stream().peek(t -> System.out.println("starting " + t.getClass().getSimpleName())).forEach(Task::runTask);
tasks.stream().peek(t -> System.out.println("starting " + t.getClass().getSimpleName())).forEach(Task::runTask);
// run again to be sure that nothing is loaded anymore
// 1 run should already be sufficient
@@ -14,7 +14,7 @@ public class TimingService {
private static long measureTime(Runnable run, int iterations, TimeUnit unit) {
if (GpuTestSystem.initPhase) {
for (int i = 0; i < 5; i++) {// only run 5 times in initialization phase
for (int i = 0; i < 25; i++) {// only run 25 times in initialization phase
run.run();
}
return -1;