Skip to content

Commit 539465c

Browse files
Fix generate statistics
1 parent 6c4ec13 commit 539465c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

nebula/scenarios.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -885,11 +885,12 @@ def scenario_finished(self, timeout_seconds):
885885
@classmethod
886886
def generate_statistics(cls, path):
887887
try:
888-
# Generate statistics
889-
logging.info(f"Generating statistics for scenario {path}")
890-
891888
# Define input directories
892889
input_event_dirs = sorted(glob.glob(os.path.join(path, "metrics/*")))
890+
if not input_event_dirs:
891+
return False
892+
# Generate statistics
893+
logging.info(f"Generating statistics for scenario {path}")
893894
# Where to write reduced TB events
894895
tb_events_output_dir = os.path.join(path, "metrics", "reduced-data")
895896
csv_out_path = os.path.join(path, "metrics", "reduced-data-as.csv")

0 commit comments

Comments
 (0)