package acceptanceworkload

import "time"

type GeminiProfile struct {
	Name        string
	Requests    int
	InputImages int
	InputBytes  int
	OutputBytes int
	DelayMin    time.Duration
	DelayMax    time.Duration
}

var (
	GeminiBaseline = GeminiProfile{
		Name: "gemini-baseline", Requests: 1000, InputImages: 1, InputBytes: 256 << 10, OutputBytes: 256 << 10,
		DelayMin: 4 * time.Second, DelayMax: 4 * time.Second,
	}
	GeminiMultiImage = GeminiProfile{
		Name: "gemini-multi-image", Requests: 192, InputImages: 3, InputBytes: 768 << 10, OutputBytes: 0,
		DelayMin: 8 * time.Second, DelayMax: 15 * time.Second,
	}
	GeminiLarge = GeminiProfile{
		Name: "gemini-large", Requests: 128, InputImages: 1, InputBytes: 2 << 20, OutputBytes: 4 << 20,
		DelayMin: 8 * time.Second, DelayMax: 15 * time.Second,
	}
	GeminiPeak = GeminiProfile{
		Name: "gemini-peak", Requests: 32, InputImages: 1, InputBytes: 8 << 20, OutputBytes: 8 << 20,
		DelayMin: 15 * time.Second, DelayMax: 30 * time.Second,
	}
)

func GeminiProfileByName(name string) (GeminiProfile, bool) {
	switch name {
	case GeminiBaseline.Name:
		return GeminiBaseline, true
	case GeminiMultiImage.Name:
		return GeminiMultiImage, true
	case GeminiLarge.Name:
		return GeminiLarge, true
	case GeminiPeak.Name:
		return GeminiPeak, true
	default:
		return GeminiProfile{}, false
	}
}

// VideoImageCount provides a deterministic 60/30/10 split for 3/6/9-image tasks.
func VideoImageCount(index int) int {
	switch index % 10 {
	case 0, 1, 2, 3, 4, 5:
		return 3
	case 6, 7, 8:
		return 6
	default:
		return 9
	}
}
