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

Correct recorder-based sampling interval #638

Merged

Conversation

danielmitterdorfer
Copy link
Member

@danielmitterdorfer danielmitterdorfer commented Jan 29, 2019

With this commit we remove the call to time.sleep from the node stats and CCR
stats recorder's record method. Thes calls are redundant because the sampler
thread that manages the recorder already calls time.sleep. This means that the
effective sample rate is effectively half of the specified one.

With this commit we remove the call to `time.sleep` from the CCR stats
recorder's `record` method. This call is redundant because the sampler
thread that manages the recorder already calls `time.sleep`. This means
that the effective sample rate is effectively half of the specified one.
@danielmitterdorfer danielmitterdorfer added bug Something's wrong :Telemetry Telemetry Devices that gather additional metrics labels Jan 29, 2019
@danielmitterdorfer danielmitterdorfer added this to the 1.0.4 milestone Jan 29, 2019
Copy link
Contributor

@dliappis dliappis left a comment

Choose a reason for hiding this comment

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

Thanks for catching this!

Isn't node-stats also affected by this though in

time.sleep(self.sample_interval)
(which is where this bug originally came from as part of copy/pasta)?

@danielmitterdorfer danielmitterdorfer changed the title Correct sampling interval for CCR stats Correct recorder-based sampling interval Jan 29, 2019
Copy link
Contributor

@dliappis dliappis left a comment

Choose a reason for hiding this comment

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

LGTM

@danielmitterdorfer danielmitterdorfer merged commit ef07c10 into elastic:master Jan 29, 2019
@danielmitterdorfer
Copy link
Member Author

Thanks, merged!

@danielmitterdorfer danielmitterdorfer deleted the ccr-stats-sampling-rate branch March 5, 2019 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something's wrong :Telemetry Telemetry Devices that gather additional metrics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants