Skip to content
This repository has been archived by the owner on Apr 23, 2020. It is now read-only.

1. made Runner sleep for (PollInterval minus processing time) #34

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sn-nr
Copy link

@sn-nr sn-nr commented Apr 14, 2015

  1. Logging Processing time every cycle
  2. Add PollInterval to Config file and using it instead of interval hardcoded value.

2. Logging Processing time every cycle
3. Add PollInterval to Config file and using it instead of interval hardcoded value.
@sn-nr
Copy link
Author

sn-nr commented Apr 14, 2015

sidekicks @lars2893 @wquraishi

@sn-nr
Copy link
Author

sn-nr commented Apr 14, 2015

  1. This commit primarily addresses an issue with the current version where the metrics reporting cycle period can vary, depending on the time it takes to process the data and report the metrics. As a result, plugins that take a long time to process can see missing data points in the middle of a series.

The first idea was to run the poll cycle in its own timer thread. Though more elegant, that approach requires non-trivial changes, especially to the way exceptions are handled and bubbled up. The simpler approach proposed in this PR leaves most of the code in tact, calculates the time it took to process metrics and subtracts it from the poll cycle interval.

  1. Made the poll cycle interval a config variable (in newrelic.json) to enable plug-in users to customize the poll cycle interval.
  2. Logging the processing time for each cycle and reporting a warning if the time exceeds the poll cycle interval.

@sn-nr
Copy link
Author

sn-nr commented May 20, 2015

sidekick @lars2893

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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

Successfully merging this pull request may close these issues.

2 participants