mirror of
https://blitiri.com.ar/repos/chasquid
synced 2026-01-27 20:45:56 +00:00
Add a skeleton queue
This patch introduces a basic, in-memory queue that only holds emails for now. This slows down the benchmarks because we don't yet have a way to wait for delivery (even if fake), that will come in later patches.
This commit is contained in:
@@ -224,6 +224,9 @@ func BenchmarkManyEmails(b *testing.B) {
|
||||
b.ResetTimer()
|
||||
for i := 0; i < b.N; i++ {
|
||||
sendEmail(b, c)
|
||||
|
||||
// TODO: Make sendEmail() wait for delivery, and remove this.
|
||||
time.Sleep(10 * time.Millisecond)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -234,6 +237,9 @@ func BenchmarkManyEmailsParallel(b *testing.B) {
|
||||
|
||||
for pb.Next() {
|
||||
sendEmail(b, c)
|
||||
|
||||
// TODO: Make sendEmail() wait for delivery, and remove this.
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user