Added substr and aliasByMetric functions#1318
Added substr and aliasByMetric functions#1318the-real-stiven wants to merge 5 commits intografana:masterfrom
Conversation
made stable
added boundary checks
| right = len(serie.Target) | ||
| } | ||
| cleanName := serie.Target[left:right] | ||
| cleanName = strings.SplitN(cleanName, ",", 2)[0] |
There was a problem hiding this comment.
This is another one that likely should be updated in graphite-web to use _getFirstPathExpression for consistency with the way we get nodes in aliasByNode etc. This implementation is consistent with what's in graphite-web today though.
| return nil, err | ||
| } | ||
|
|
||
| out := make([]models.Series, len(series)) |
There was a problem hiding this comment.
functions that do not affect the datapoints slices (eg that only change the names/tags), don't need to allocate new output series, and don't add them to the cache either (because we currently only use the cache to mark what needs to be returned the pool). i know this is confusing, you may want to freshen up on devdocs/expr.md
|
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. |
|
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 substr() and aliasByMetric() Graphite functions.