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

Graphite output only deals with the latest change and not the entire data series #262

Closed
sheriffio opened this issue Sep 18, 2015 · 3 comments

Comments

@sheriffio
Copy link
Contributor

I might be understanding this incorrectly, but I did have some debug statements and it shows that the min, max, and avg to be the same value.

The line in question is: https://github.com/arachnys/cabot/blob/master/cabot/cabotapp/models.py#L603 the variable

graphite_output['series']

is always only showing one data point which is the latest data point. Is this by design or a bug?

If it is a bug I have a fix for it. I also added checks for < (avg), > (avg), <= (avg), and >= (avg). Let me know your thoughts.

@dbuxton
Copy link
Contributor

dbuxton commented Sep 21, 2015

Sounds like a bug, but I'm not sure I totally understand. Do you have a test case that shows what you mean?

@sheriffio
Copy link
Contributor Author

Sure, I was thrown off by the average, min, and max calculations that are
in
https://github.com/arachnys/cabot/blob/master/cabot/cabotapp/graphite.py#L85-L87
also
the min vs max checks in
https://github.com/arachnys/cabot/blob/master/cabot/cabotapp/models.py#L603-L627
those
two made me think that it's supposed to work with the entire series rather
than just the latest.

As an example if you have the following series:

[[20.3, 1442834740], [12.5, 1442834750], [0.1, 1442834760], [0.8,
1442834770], [134.9, 1442834780], [151.0, 1442834790]]

you will have the average = 151.0, min = 151.0, and max = 151.0. Rather
than what I thought as average = 53.3, min = 0.1, and max = 151.0.

On Mon, Sep 21, 2015 at 7:31 AM David Buxton notifications@github.com
wrote:

Sounds like a bug, but I'm not sure I totally understand. Do you have a
test case that shows what you mean?


Reply to this email directly or view it on GitHub
#262 (comment).

dbuxton added a commit that referenced this issue Sep 22, 2015
@dbuxton
Copy link
Contributor

dbuxton commented Sep 22, 2015

@crucial7 if you look at the tests I added in ee34cee I think you'll find that it's working correctly - or am I missing something?

Can you check and re-open this issue if you think there is a bug?

@dbuxton dbuxton closed this as completed Sep 22, 2015
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

No branches or pull requests

2 participants