diff --git a/peticiones.py b/peticiones.py deleted file mode 100644 index cec621815293c25f7cf578c98420c4e6fd4c2796..0000000000000000000000000000000000000000 --- a/peticiones.py +++ /dev/null @@ -1,19 +0,0 @@ -import csv -from collections import Counter - -def count_thread_names(csv_file): - thread_names = [] - with open(csv_file, 'r') as file: - reader = csv.DictReader(file) - for row in reader: - thread_names.append(row['threadName']) - - count = Counter(thread_names) - - with open('peticiones2.csv', 'w', newline='') as file: - writer = csv.writer(file) - writer.writerow(['threadName', 'numeroPeticiones']) - for thread_name, count in sorted(count.items(), key=lambda x: x[0]): - writer.writerow([thread_name, count]) - -count_thread_names('medidas2.csv') \ No newline at end of file