tacco.benchmarking.benchmark_shell¶
- benchmark_shell(command, command_args=[], working_directory=None, verbose=0)[source]¶
Benchmarks time and memory consumption of a shell command.
- Parameters:
command – A string specifying the command line command to be measured.
command_args – A list of strings specifying the command line arguments to supply.
working_directory – The directory where to execute the command. If None, a temporary directory is used and cleaned in the end.
verbose – Whether to print stderr and stdout of the command run.
- Returns:
Returns a dict containing the runtime in seconds under the key “shell_time_s” and the memory usage under “max_mem_usage_GB”.