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

Display multiple panels per section #120

Merged
merged 3 commits into from
Nov 20, 2024
Merged

Display multiple panels per section #120

merged 3 commits into from
Nov 20, 2024

Conversation

csmarchbanks
Copy link
Contributor

We were overwriting the section each time we came across a new metric within the section. Instead, append the new panel. Appending to a nil slice will naturally create a new slice so this is safe to do.

We were overwriting the section each time we came across a new metric
within the section. Instead, append the new panel. Appending to a nil
slice will naturally create a new slice so this is safe to do.
@@ -348,7 +348,7 @@ func transformMetricsData(results []Result) GetModelMetricsResponse {
panels = append(panels, newPanel)
}

response.Sections[sectionName] = panels
response.Sections[sectionName] = append(response.Sections[sectionName], panels...)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a little confusing to have the metric namespace as part of the name, maybe we can split that out into a separate field? But also that can be handled in another issue

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that is way too big of a change to want to do as part of this PR. That would probably change the entire log signature and probably request format too, not sure if that is something we want.

@@ -348,7 +348,7 @@ func transformMetricsData(results []Result) GetModelMetricsResponse {
panels = append(panels, newPanel)
}

response.Sections[sectionName] = panels
response.Sections[sectionName] = append(response.Sections[sectionName], panels...)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a test for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated a test to catch this case as well!

This test fails before the fix to putting groups together to catch any
regressions. In addition, upgrade the version of godeltaprof being used
in order to allow tests to be ran on a mac.
This both fixes an occassional failing test and will render the page in
a deterministic way.
Copy link
Contributor

@annanay25 annanay25 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@csmarchbanks csmarchbanks merged commit 49e0480 into main Nov 20, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants