-
Notifications
You must be signed in to change notification settings - Fork 3
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
Conversation
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...) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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...) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
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.