Add Peek() calls to the benchmark for more realism
Evan Huus
9 years ago
1 changed file(s) with
2 addition(s)
and
0 deletion(s)
.
Raw diff
Collapse all
Expand all
+2
-0
queue_test.go
less
more
104
104
q.Add(nil)
105
105
}
106
106
for i := 0; i < b.N; i++ {
107
q.Peek()
107
108
q.Remove()
108
109
}
109
110
}
123
124
q := New()
124
125
for i := 0; i < b.N; i++ {
125
126
q.Add(nil)
127
q.Peek()
126
128
q.Remove()
127
129
}
128
130
}