[Issue #11] - added ability to create new benchmark settings profiles
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2025-10-22 00:58:32 -04:00
parent 431d94660d
commit 008a6a5c72
14 changed files with 173 additions and 38 deletions

View File

@@ -15,15 +15,15 @@ type Test struct {
HardwareID int
Hardware Hardware
// many-to-many benchmarks
Benchmarks []Benchmark `gorm:"many2many:tests_benchmarks;"`
// many-to-many benchmark profiles
BenchmarkProfiles []Benchmark `gorm:"many2many:tests_benchmark_profiles;"`
// has many results
Results []Result
}
func (t *Test) SelectedBenchmarks() []string {
benchmarks := t.Benchmarks
benchmarks := t.BenchmarkProfiles
ids := make([]string, len(benchmarks))
for i, b := range benchmarks {
ids[i] = strconv.Itoa(int(b.ID))
@@ -34,7 +34,7 @@ func (t *Test) SelectedBenchmarks() []string {
func (t *Test) IsBenchmarkSelected(benchmarkID uint) bool {
benchmarkUint := uint(benchmarkID)
for _, b := range t.Benchmarks {
for _, b := range t.BenchmarkProfiles {
if b.ID == benchmarkUint {
return true
}