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

cmd/bosun: Refactor filter expr func to also filter out zero valued results #1206

Merged
merged 1 commit into from
Jul 27, 2015

Conversation

kylebrandt
Copy link
Member

…esults (false)

This is a breaking change. Fixes #1100

…esults (false)

This is a breaking change. Fixes #1100
@@ -360,7 +360,9 @@ func Filter(e *State, T miniprofiler.Timer, series *Results, number *Results) (*
for _, sr := range series.Results {
for _, nr := range number.Results {
if sr.Group.Subset(nr.Group) || nr.Group.Subset(sr.Group) {
ns = append(ns, sr)
if nr.Value.Value().(Number) != 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

This type of type assertion will panic if anything but a number makes it here.

Copy link
Member Author

Choose a reason for hiding this comment

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

@captncraig I'm aware but throughout the funcs.go we don't check them since the map[string]parse.Func{... ensures we won't get there.

@captncraig captncraig changed the title cmd/bosun: Refactor filter expr func to also filter out zero valued r… cmd/bosun: Refactor filter expr func to also filter out zero valued results Jul 27, 2015
captncraig added a commit that referenced this pull request Jul 27, 2015
cmd/bosun: Refactor filter expr func to also filter out zero valued results
@captncraig captncraig merged commit 59b80cf into master Jul 27, 2015
@captncraig captncraig deleted the newFilter branch July 27, 2015 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants