Starting from 2021-07-01, all LRZ GitLab users will be required to explicitly accept the GitLab Terms of Service. Please see the detailed information at and make sure that your projects conform to the requirements.

Commit 52b18a14 authored by Benedikt Kleinmeier's avatar Benedikt Kleinmeier
Browse files

In "", print runtime (in seconds)...

In "", print runtime (in seconds) for each scenario file.
parent 24dc2eb0
Pipeline #63742 failed with stages
in 4 minutes and 6 seconds
......@@ -13,6 +13,7 @@ import os
import re
import shutil
import subprocess
import time
def find_scenario_files(path="VadereModelTests"):
scenario_search_pattern = "*.scenario"
......@@ -45,13 +46,21 @@ def run_scenario_files_with_vadere_console(scenario_files, vadere_console="Vader
for i, scenario_file in enumerate(scenario_files):
print("Running scenario file ({}/{}): {}".format(i + 1, total_scenario_files, scenario_file))
# Measure wall time and not cpu because it is the easiest.
wall_time_start = time.time()
# Use timout feature, check return value and capture stdout/stderr to a PIPE (use completed_process.stdout to get it).
completed_process =["java", "-enableassertions", "-jar", vadere_console, scenario_file, output_dir],
print("Finished scenario file: {}".format(scenario_file))
wall_time_end = time.time()
wall_time_delta = wall_time_end - wall_time_start
print("Finished scenario file ({:.1f} s): {}".format(wall_time_delta, scenario_file))
if os.path.exists(output_dir):
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