Example #1
0
func generateLargeMessages(n int) []proto.Message {
	queue := make([]proto.Message, n)
	for i := range queue {
		queue[i] = testmessage.GenerateLargeMessage()
	}
	return queue
}
Example #2
0
func generateMixedMessages(n int) []proto.Message {
	queue := make([]proto.Message, n*4)
	for i := 0; i < n*4; i = i + 4 {
		queue[i] = testmessage.GenerateSmallMessage()
		queue[i+1] = testmessage.GenerateMediumMessage()
		queue[i+2] = testmessage.GenerateBigMessage()
		queue[i+3] = testmessage.GenerateLargeMessage()
	}
	shuffleMessages(&queue)
	return queue
}