func writeBatch(db storage.Engine, c *Config) int { ws := c.MakeBatch() if err := db.BatchPut(ws); err != nil { panic(err) } return len(ws) }