Skip to content

Commit

Permalink
encapsulation
Browse files Browse the repository at this point in the history
  • Loading branch information
Miryam-Schwartz committed Dec 1, 2024
1 parent b31417e commit c8a5b1d
Showing 1 changed file with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,7 @@ def get_critical_event_bursts(self, n=5):
"Critical Event Bursts",
)

# Convert the result to a list of dictionaries for returning
burst_list = bursts.rename(columns={"minute": "timestamp"}).to_dict(
orient="records"
)

return burst_list
return bursts

def plot_critical_events_per_aggregation_time(self):
critical_events = self.get_events_by_log_level("CRITICAL")
Expand Down Expand Up @@ -155,10 +150,8 @@ def plot_link_up_down_count_per_aggregation_time(self):

def full_analysis(self):
super().full_analysis()
critical_events_headers = ["timestamp", "event_type", "event", "count"]
txt_to_add = (
self.get_critical_event_bursts(),
"More than 5 events burst over a minute",
critical_events_headers,
self.get_critical_event_bursts()
)
self._txt_for_pdf.append(txt_to_add)
self._dataframes_for_pdf.append(txt_to_add)

0 comments on commit c8a5b1d

Please sign in to comment.