Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue: 4207448: Remove the API requests URLs prefixes + issue: 4207454: Handle not found UFM version case #289

Merged
merged 1 commit into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,10 @@ def print_exceptions_per_time_count(self):
)

def save_ufm_versions(self):
if not self.ufm_versions:
self.ufm_versions = "Not found"
self._txt_for_pdf.append(
f"Used ufm version in console log {self.ufm_versions}{os.linesep}"
f"Used ufm version in console log: {self.ufm_versions}"
)

def full_analysis(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ 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))
self._dataframes_for_pdf.append(("Fabric info from ibdiagnet", fabric_info))

def full_analysis(self):
super().full_analysis()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,20 @@ def analyze_endpoints_freq(self, endpoints_count_to_show=10):
).fillna(0)
data_to_show = data_to_show[top_x_uris]

# Extract only the path part after the domain and protocol from each URL
suffix_mapping = {}
for uri in top_x_uris:
parsed_uri = urlparse(uri)
suffix = parsed_uri.path.lstrip("/") # Remove the leading slash if any
suffix_mapping[uri] = suffix

# Rename the columns in the data to use the suffix
data_to_show.rename(columns=suffix_mapping, inplace=True)

return self._save_pivot_data_in_bars(
data_to_show,
"time",
"requests count",
f"Top {endpoints_count_to_show} " "requests count over time",
"legend",
f"Top {endpoints_count_to_show} api requests count over time",
"path",
)