-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash | ||
|
||
# Verifica que el número de iteraciones se haya pasado como argumento | ||
if [ -z "$1" ]; then | ||
echo "Uso: $0 <numero_de_iteraciones>" | ||
exit 1 | ||
fi | ||
|
||
# Número de iteraciones | ||
ITERACIONES=$1 | ||
|
||
# Filtros a usar | ||
FILTROS=("PyramidalCell0" "PyramidalCell1" "SomaClustering0" "SomaClustering1" "TumorConcept0" "TumorConcept1") | ||
|
||
# Iterar sobre cada filtro | ||
for FILTRO in "${FILTROS[@]}"; do | ||
# Archivo CSV para cada filtro | ||
CSV_FILE="${FILTRO}_tiempos.csv" | ||
|
||
# Agregar encabezado al archivo CSV | ||
echo "Startup (ns),Run (ns)" > "$CSV_FILE" | ||
|
||
# Iterar la cantidad de veces especificada | ||
for ((i=0; i<$ITERACIONES; i++)); do | ||
# Ejecutar el comando y filtrar los tiempos | ||
${BDMSYS}/bin/biodynamo-benchmark --benchmark_filter="$FILTRO" --benchmark_out=/dev/null | \ | ||
grep -oP 'Startup: \d+ ns|Run: \d+ ns' | \ | ||
awk '{gsub(/[^0-9]/,"",$2); print $2}' | \ | ||
paste -sd, - >> "$CSV_FILE" | ||
done | ||
done | ||
|