Skip to content

Latest commit

 

History

History
18 lines (18 loc) · 333 Bytes

readme.md

File metadata and controls

18 lines (18 loc) · 333 Bytes
package main
func main() {
	b := batcher.New(time.Second*5, 3)
	//Start to receive data 
	b.Run()
	//Chan to receive batch 
	batches := b.GetBatches() 
	// Calculate execution time and batch data
	for batch := range batches {
		fmt.Println(batch)
	}
}

benchmark batcher

go test -bench=. -benchmem -benchtime=1s