#!/bin/sh set -e _jobs=0 mkdir -p "./networks.d" mkdir -p "./profiling" find "./networks.d/" ! -name "$(printf "*\n*")" -name '*.json' > bench_nets.tmp while IFS= read -r _file; do printf "Benchmarking '%s' file...\n" "$_file" mprof run \ --output "profiling/mprofile_$(basename "$_file").dat" \ --backend psutil_pss \ --python \ --include-children \ ./benchmark.py \ -j $_jobs \ "$_file" printf "Benchmark '%s' file completed.\n" "$_file" done < bench_nets.tmp rm bench_nets.tmp