package acceptanceworkload

import "testing"

func TestGeminiProfilesAndVideoDistribution(t *testing.T) {
	for _, profile := range []GeminiProfile{GeminiBaseline, GeminiMultiImage, GeminiLarge, GeminiPeak} {
		resolved, ok := GeminiProfileByName(profile.Name)
		if !ok || resolved != profile {
			t.Fatalf("profile %q resolved to %+v, ok=%v", profile.Name, resolved, ok)
		}
		if profile.Requests <= 0 || profile.InputImages <= 0 || profile.InputBytes < profile.InputImages || profile.OutputBytes < 0 ||
			profile.DelayMin <= 0 || profile.DelayMax < profile.DelayMin {
			t.Fatalf("invalid Gemini profile: %+v", profile)
		}
		if profile.Name != GeminiMultiImage.Name && profile.OutputBytes == 0 {
			t.Fatalf("fixed-output Gemini profile has no output size: %+v", profile)
		}
	}
	counts := map[int]int{}
	for index := 0; index < 100; index++ {
		counts[VideoImageCount(index)]++
	}
	if counts[3] != 60 || counts[6] != 30 || counts[9] != 10 {
		t.Fatalf("video image distribution=%v", counts)
	}
}
