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

[query] fix constantLine() to return 3 steps, just like Graphite #2699

Merged
merged 6 commits into from
Oct 7, 2020

Conversation

teddywahle
Copy link
Contributor

@teddywahle teddywahle commented Oct 6, 2020

Here is the Graphite source:

def constantLine(requestContext, value):
  name = "constantLine(%s)" % str(value)
  start = int(epoch( requestContext['startTime'] ) )
  end = int(epoch( requestContext['endTime'] ) )
  step = int((end - start) / 2.0)
  series = TimeSeries(str(value), start, end, step, [value, value, value], xFilesFactor=requestContext.get('xFilesFactor'))
  series.pathExpression = name
  return [series]

@teddywahle teddywahle changed the title Fix constant line [query] fix constantLine() to return 3 steps, just like Graphite Oct 6, 2020
Copy link
Collaborator

@robskillington robskillington left a comment

Choose a reason for hiding this comment

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

LGTM

@robskillington robskillington merged commit 141048d into m3db:master Oct 7, 2020
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.

None yet

2 participants