From cae0fbb56e5dfbe9f4e99d7758c310b77e94d201 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Constantin=20F=C3=BCrst?= Date: Tue, 30 Jan 2024 13:59:15 +0100 Subject: [PATCH] remove benchmark descriptor handling helper scripts --- benchmarks/benchmark-descriptors/modifier.py | 31 -------------------- benchmarks/benchmark-descriptors/renamer.sh | 19 ------------ 2 files changed, 50 deletions(-) delete mode 100644 benchmarks/benchmark-descriptors/modifier.py delete mode 100644 benchmarks/benchmark-descriptors/renamer.sh diff --git a/benchmarks/benchmark-descriptors/modifier.py b/benchmarks/benchmark-descriptors/modifier.py deleted file mode 100644 index 5e64ac7..0000000 --- a/benchmarks/benchmark-descriptors/modifier.py +++ /dev/null @@ -1,31 +0,0 @@ -import os -import json -import shutil -import copy - -def process_json_file(file_path): - fr = open(file_path, 'r') - json_data = json.load(fr) - - entries = json_data["count"] - - for i in range(entries): - bs = json_data["list"][i]["task"]["batching"]["batch_size"] - del json_data["list"][i]["task"]["batching"] - del json_data["list"][i]["task"]["iterations"] - json_data["list"][i]["task"]["batch_size"] = bs - - json_data["repetitions"] = 10 - - with open(file_path, 'w') as f: - json.dump(json_data, f, indent=2) - -def process_files_in_folder(folder_path): - for filename in os.listdir(folder_path): - file_path = os.path.join(folder_path, filename) - if os.path.isfile(file_path) and filename.endswith('.json'): - process_json_file(file_path) - -if __name__ == "__main__": - folder_path = "./benchmark-descriptors/peak-perf-smart-cpu/" - process_files_in_folder(folder_path) diff --git a/benchmarks/benchmark-descriptors/renamer.sh b/benchmarks/benchmark-descriptors/renamer.sh deleted file mode 100644 index 4a7812b..0000000 --- a/benchmarks/benchmark-descriptors/renamer.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -json_directory="$1" - -# Check if the specified directory exists -if [ ! -d "$json_directory" ]; then - echo "Error: Directory $json_directory not found. Provide as arg \$1" - exit 1 -fi - -# Iterate over all JSON files in the directory -for json_file in "$json_directory"/*.json; do - # Check if there are matching files - if [ -e "$json_file" ]; then - bn=$(basename $json_file) - name="${bn%.*}" - mv $json_file "${json_directory}/${name}-cpu.json" - fi -done