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

Should pyformance_usecase.py include a call to report_now()? #60

Open
vinaytota-optimizely opened this issue Aug 28, 2017 · 3 comments
Open
Assignees

Comments

@vinaytota-optimizely
Copy link

I created a script modeled on the example pyformance_usecase.py script, however I found that my metrics don't seem to be flushed unless I call report_now(), previously I only called stop().

Is this some kind of user error (I can provide my whole script), or is it a mistake in the example script?

@vinaytota-optimizely vinaytota-optimizely changed the title Should pyformance_usecase.py include a call to report_now()? Should pyformance_usecase.py include a call to report_now()? Aug 28, 2017
@mpetazzoni
Copy link
Contributor

Calling stop() should flush all pending metrics. Are you sure you are starting the SignalFxReporter? Share your script, if you can, it would definitely help me spot anything that might be missing.

@mpetazzoni mpetazzoni self-assigned this Aug 29, 2017
@vinaytota-optimizely
Copy link
Author

Here's my script (edited somewhat for brevity)
https://gist.github.com/vinaytota-optimizely/af8b78b0ebdf0555d2c211e180be65fc
I'm calling start on pyformance but not signalfx.SignalFx. I'm calling stop on both, but maybe in the wrong order?

@mpetazzoni
Copy link
Contributor

mpetazzoni commented Aug 29, 2017

Looks fine. Can you check that SignalFxReporter.report_now() is correctly called periodically by Pyformance?

Also, depending on how quickly your run_test() method runs, it seems possible that metric updates since the last report are lost since we don't call report_now() one last time on stop. I can make the SignalFxReporter do that automatically, but no other Pyformance reporter seems to care about it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants