Skip to content

Commit

Permalink
script to count generated events/errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jsoldani committed Dec 12, 2023
1 parent 68f93b6 commit 04711af
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions data/experiments/sock-echo/count-generated-events.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import os

ls = os.listdir("generated-logs")

print("experiment,log_file,events,errors")
for folder in ls:
if "logs" in folder:
files = os.listdir("generated-logs/" + folder)
for fileName in files:
path = "generated-logs/" + folder + "/" + fileName
f = open(path)
lines = 0
errors = 0
for line in f:
lines += 1
if "ERROR" in line:
errors += 1
print(folder + "," + fileName + "," + str(lines) + "," + str(errors))

0 comments on commit 04711af

Please sign in to comment.