Skip to content

Commit

Permalink
Add enumeration test
Browse files Browse the repository at this point in the history
  • Loading branch information
dougmill committed Jun 12, 2017
1 parent 064c8cc commit 04410d3
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Priority Queue Benchmarks/Benchmarks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,5 +150,19 @@ public bool EnqueueContains()
}
return ret;
}

[Benchmark]
public float EnqueueEnumerator()
{
Enqueue();
float prioritySum = 0;

foreach(FastPriorityQueueNode node in Queue)
{
prioritySum += node.Priority;
}

return prioritySum;
}
}
}

0 comments on commit 04410d3

Please sign in to comment.