-
Notifications
You must be signed in to change notification settings - Fork 107
Conversation
Nice work! |
There are a few things I see that this doesn't (yet) account for:
|
Hi Dan,
|
|
To Dan's point, if you did something like:
You get |
re 1, i think this is a separate bug and outside of scope of this function re 3:
i've thought about something similar, and that is just to target an older version , so that we can still have stable to mean graphite compatible; albeit with an older - specific - version of graphite. like maybe our target shouldn't be "current graphite", but "graphite as it was xx months ago", this may allow us to not implement all of the functions, if some of them have been implemented very recently. However, let's try to avoid this for now and let's just see how far we get. with the xFilesfactor in particular, seems we can just add this fairly easily and be done with it. |
ok, I added support for xff through function parameter. I also made aggregate more usable by other functions so that it respects xff set through settings (which still needs to be implemented) and sets the |
added helper function for combining query patterns
remove xff vals after computing agg function fixed tests
69eff87
to
ad691de
Compare
case "last", "current": | ||
return crossSeriesLast | ||
case "count": | ||
return crossSeriesCount |
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.
good additions. they weren't documented in graphite either so i filed a pr for graphite docs.
https://github.com/graphite-project/graphite-web/pull/2451/files
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.
seems we are missing avg_zero
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.
added avg_zero!
a few remarks regarding xFilesFactor:
|
|
I don't understand. you're saying that xff is a check for multiple datapoints across several series, but for the same timestamp, and i looked at the implementation of one of the mentioned functions - crossSeriesMin - and that's how it aggregates, across series, in buckets per timestamp. Why can't we add xFF support to all cross series aggregation functions? i don't see how this would lead to duplicated code or messy pre-processing. |
Stiven Deleur [9:21 AM] dieter [9:22 AM] Stiven Deleur [9:24 AM] dieter [9:25 AM] Stiven Deleur [9:27 AM] dieter [9:29 AM] Stiven Deleur [9:30 AM] dieter [9:32 AM] Stiven Deleur [9:34 AM] should kill two birds with one stone in terms of performance and DRY dieter [9:36 AM] Stiven Deleur [9:39 AM] dieter [9:40 AM] Stiven Deleur [9:40 AM] dieter [9:44 AM] Stiven Deleur [9:45 AM] Stiven Deleur [9:55 AM] |
return xff(nonNull, len(in), xFilesFactor) | ||
} | ||
|
||
func xff(nonNull int, total int, xFilesFactor float64) bool { |
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.
please add a comment for both of these functions to explain the purpose
@@ -64,6 +70,28 @@ func crossSeriesAvg(in []models.Series, out *[]schema.Point) { | |||
} | |||
} | |||
|
|||
func crossSeriesAvgZero(in []models.Series, out *[]schema.Point) { |
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.
please add a comment explaining this function. how does it differ from avg?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Native implementation of aggregate() Graphite function. (http://graphite.readthedocs.io/en/latest/functions.html#graphite.render.functions.aggregate)
Speed improvement (used mtcmptest):