Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
drorlevy committed Dec 3, 2024
1 parent 9164663 commit 7e97367
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -205,14 +205,11 @@ def __init__(
def _remove_empty_lines_from_csv(input_file):
temp_file = input_file + ".temp"

with (
open(
with open(
input_file, "r", newline="", encoding=DataConstants.UTF8ENCODING
) as infile,
open(
) as infile, open(
temp_file, "w", newline="", encoding=DataConstants.UTF8ENCODING
) as outfile,
):
) as outfile:
reader = csv.reader(infile)
writer = csv.writer(outfile)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def __init__(
self._funcs_for_analysis = {
self.print_exceptions_per_time_count,
self.print_exceptions,
}
}

@staticmethod
def _extract_ufm_version(logs_csvs):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,3 @@ def plot_link_up_down_count_per_aggregation_time(self):
self._save_pivot_data_in_bars(
pivot_links_data, "Time", "Number of Events", "Link up/down events", "Event"
)

def full_analysis(self):
super().full_analysis()
df_to_add = (
"More than 5 events burst over a minute",
self.get_critical_event_bursts(),
)
self._dataframes_for_pdf.append(df_to_add)
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@
class IBDIAGNETLogAnalyzer(BaseAnalyzer):
def __init__(self, logs_csvs: List[str], hours: int, dest_image_path):
super().__init__(logs_csvs, hours, dest_image_path, sort_timestamp=False)
self._funcs_for_analysis = {self.save_fabric_size}
self._funcs_for_analysis = {
self.save_fabric_size,
self.print_fabric_size,
}

def print_fabric_size(self):
fabric_info = self.get_fabric_size()
Expand All @@ -32,7 +35,3 @@ def get_fabric_size(self):
def save_fabric_size(self):
fabric_info = self.get_fabric_size()
self._dataframes_for_pdf.append(("Fabric info", fabric_info))

def full_analysis(self):
super().full_analysis()
self.print_fabric_size()

0 comments on commit 7e97367

Please sign in to comment.