package query

import (
	"fmt"
	"testing"
)

func BenchmarkBulkInsertOrdered(b *testing.B) {
	// Simulate Lead object: 377 columns
	numCols := 377
	columns := make([]string, numCols)
	for i := 0; i < numCols; i++ {
		columns[i] = fmt.Sprintf("col_%d", i)
	}

	// Simulate Batch: 132 rows
	batchSize := 132
	records := make([]map[string]interface{}, batchSize)
	for i := 0; i < batchSize; i++ {
		rec := make(map[string]interface{}, numCols)
		for _, col := range columns {
			rec[col] = "some_value"
		}
		records[i] = rec
	}

	b.ResetTimer()
	for i := 0; i < b.N; i++ {
		BulkInsertOrdered("lead", columns, records, nil)
	}
}
