Explorar el Código

Add Peek() calls to the benchmark for more realism

Evan Huus hace 11 años
padre
commit
11fd258f28
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      queue_test.go

+ 2 - 0
queue_test.go

@@ -105,6 +105,7 @@ func BenchmarkQueueSerial(b *testing.B) {
 		q.Add(nil)
 	}
 	for i := 0; i < b.N; i++ {
+		q.Peek()
 		q.Remove()
 	}
 }
@@ -124,6 +125,7 @@ func BenchmarkQueueTickTock(b *testing.B) {
 	q := New()
 	for i := 0; i < b.N; i++ {
 		q.Add(nil)
+		q.Peek()
 		q.Remove()
 	}
 }