Skip to content

Commit

Permalink
Change bits of benchs to account for Xadd default behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
franz1981 authored and nitsanw committed May 30, 2020
1 parent 77f8c87 commit c0b570d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,12 @@ public void setupQueueAndConsumers()
final Event event = new Event();

// stretch the queue to the limit, working through resizing and full
for (int i = 0; i < 128 + 100; i++)
// 128 * 2 account for the xadd qs that pool by default 2 chunks
for (int i = 0; i < ((128 * 2) + 100); i++)
{
q.offer(event);
}
for (int i = 0; i < 128 + 100; i++)
for (int i = 0; i < ((128 * 2) + 100); i++)
{
q.poll();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,12 @@ public void setupQueueAndConsumers()
final Event event = new Event();

// stretch the queue to the limit, working through resizing and full
for (int i = 0; i < 128 + 100; i++)
// 128 * 2 account for the xadd qs that pool by default 2 chunks
for (int i = 0; i < ((128 * 2) + 100); i++)
{
q.offer(event);
}
for (int i = 0; i < 128 + 100; i++)
for (int i = 0; i < ((128 * 2) + 100); i++)
{
q.poll();
}
Expand Down

0 comments on commit c0b570d

Please sign in to comment.