Skip to content
This repository was archived by the owner on Sep 17, 2025. It is now read-only.

Increase batch size in background thread transport#86

Merged
liyanhui1228 merged 5 commits intocensus-instrumentation:masterfrom
liyanhui1228:thread
Nov 28, 2017
Merged

Increase batch size in background thread transport#86
liyanhui1228 merged 5 commits intocensus-instrumentation:masterfrom
liyanhui1228:thread

Conversation

@liyanhui1228
Copy link
Copy Markdown
Contributor

Closes #85

self._queue.task_done()

# Wait for a while before next export
time.sleep(_WAIT_PERIOD)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Will removing the sleep make this into a busy loop and eat CPU?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah agree, changed to reduce the sleep time to 1 second. Just want to make sure the spans are sent within the grace period.

return True

with self._lock:
print('Number of spans pending sent: {}'.format(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is the printing meant to stay or is it just for debugging?

If intentional, should it be some kind of optional, configurable logger instead?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed.

@liyanhui1228 liyanhui1228 merged commit 95bf4e0 into census-instrumentation:master Nov 28, 2017
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