MCPcopy Index your code
hub / github.com/eapache/queue / BenchmarkQueueSerial

Function BenchmarkQueueSerial

queue_test.go:149–158  ·  view source on GitHub ↗

General warning: Go's benchmark utility (go test -bench .) increases the number of iterations until the benchmarks take a reasonable amount of time to run; memory usage is *NOT* considered. On my machine, these benchmarks hit around ~1GB before they've had enough, but if you have less than that avai

(b *testing.B)

Source from the content-addressed store, hash-verified

147// enough, but if you have less than that available and start swapping, then all bets are off.
148
149func BenchmarkQueueSerial(b *testing.B) {
150 q := New()
151 for i := 0; i < b.N; i++ {
152 q.Add(nil)
153 }
154 for i := 0; i < b.N; i++ {
155 q.Peek()
156 q.Remove()
157 }
158}
159
160func BenchmarkQueueGet(b *testing.B) {
161 q := New()

Callers

nothing calls this directly

Calls 4

NewFunction · 0.85
AddMethod · 0.80
PeekMethod · 0.80
RemoveMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…