Commit 309fa7e7 authored by Dave Watson's avatar Dave Watson

QueueBenchmark set max read at once

Summary: Makes a fair comparison between asox queue and notification queue.  THe updated benchmark is just noise in this diff, notificationqueue isn't fast enough (yet) to make a difference.

Test Plan:
fbconfig common/concurrency; fbmake opt
./common/concurrency/QueueBenchmark.sh

Reviewed By: afrind@fb.com

FB internal diff: D1272859
parent b8ec9e50
...@@ -190,6 +190,10 @@ int EventBase::getNotificationQueueSize() const { ...@@ -190,6 +190,10 @@ int EventBase::getNotificationQueueSize() const {
return queue_->size(); return queue_->size();
} }
void EventBase::setMaxReadAtOnce(uint32_t maxAtOnce) {
fnRunner_->setMaxReadAtOnce(maxAtOnce);
}
// Set smoothing coefficient for loop load average; input is # of milliseconds // Set smoothing coefficient for loop load average; input is # of milliseconds
// for exp(-1) decay. // for exp(-1) decay.
void EventBase::setLoadAvgMsec(uint32_t ms) { void EventBase::setLoadAvgMsec(uint32_t ms) {
......
...@@ -345,6 +345,8 @@ class EventBase : private boost::noncopyable, public TimeoutManager { ...@@ -345,6 +345,8 @@ class EventBase : private boost::noncopyable, public TimeoutManager {
int getNotificationQueueSize() const; int getNotificationQueueSize() const;
void setMaxReadAtOnce(uint32_t maxAtOnce);
/** /**
* Verify that current thread is the EventBase thread, if the EventBase is * Verify that current thread is the EventBase thread, if the EventBase is
* running. * running.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment