From 5271299609c5b6bab4aa6d20625d645e1e536e88 Mon Sep 17 00:00:00 2001 From: Alexey Palazhchenko Date: Tue, 3 Sep 2024 18:29:03 +0400 Subject: [PATCH] Do not run ycsb workloads for extra configurations (#1018) --- cmd/dance/main.go | 12 +++++++++--- internal/configload/configload.go | 2 +- projects/ycsb-workloada.yml | 12 ------------ projects/ycsb-workloadb.yml | 12 ------------ projects/ycsb-workloadc.yml | 12 ------------ 5 files changed, 10 insertions(+), 40 deletions(-) diff --git a/cmd/dance/main.go b/cmd/dance/main.go index dfc99418..1d745774 100644 --- a/cmd/dance/main.go +++ b/cmd/dance/main.go @@ -180,14 +180,20 @@ func main() { for _, cf := range cli.Config { for _, db := range cli.Database { - log.Println(db, cf) + rl := l.With(slog.String("config", cf), slog.String("database", db)) c, err := configload.Load(cf, db) if err != nil { - log.Fatal(err) + rl.Error(err.Error()) + os.Exit(1) } - rl := l.With(slog.String("config", cf), slog.String("database", db)) + if c == nil { + rl.Warn("No configuration, skipping") + continue + } + + rl.Info("Configuration loaded") var runner runner.Runner diff --git a/internal/configload/configload.go b/internal/configload/configload.go index 8aa6df8f..65d4122d 100644 --- a/internal/configload/configload.go +++ b/internal/configload/configload.go @@ -184,7 +184,7 @@ func loadContent(content, db string) (*config.Config, error) { res := pc.Results[db] if res == nil { - return nil, fmt.Errorf("no results configuration for %q", db) + return nil, nil } results, err := res.convert() diff --git a/projects/ycsb-workloada.yml b/projects/ycsb-workloada.yml index e96ac528..6bd04242 100644 --- a/projects/ycsb-workloada.yml +++ b/projects/ycsb-workloada.yml @@ -12,10 +12,6 @@ results: stats: pass: 3 - mongodb-secured: - stats: - pass: 3 - ferretdb-postgresql: stats: pass: 3 @@ -23,11 +19,3 @@ results: ferretdb-sqlite-replset: stats: pass: 3 - - ferretdb-postgresql-secured: - stats: - pass: 3 - - ferretdb-sqlite-replset-secured: - stats: - pass: 3 diff --git a/projects/ycsb-workloadb.yml b/projects/ycsb-workloadb.yml index a2c7b775..b2ddb723 100644 --- a/projects/ycsb-workloadb.yml +++ b/projects/ycsb-workloadb.yml @@ -12,10 +12,6 @@ results: stats: pass: 3 - mongodb-secured: - stats: - pass: 3 - ferretdb-postgresql: stats: pass: 3 @@ -23,11 +19,3 @@ results: ferretdb-sqlite-replset: stats: pass: 3 - - ferretdb-postgresql-secured: - stats: - pass: 3 - - ferretdb-sqlite-replset-secured: - stats: - pass: 3 diff --git a/projects/ycsb-workloadc.yml b/projects/ycsb-workloadc.yml index dc89f22e..63d04e9e 100644 --- a/projects/ycsb-workloadc.yml +++ b/projects/ycsb-workloadc.yml @@ -12,10 +12,6 @@ results: stats: pass: 2 - mongodb-secured: - stats: - pass: 2 - ferretdb-postgresql: stats: pass: 2 @@ -23,11 +19,3 @@ results: ferretdb-sqlite-replset: stats: pass: 2 - - ferretdb-postgresql-secured: - stats: - pass: 2 - - ferretdb-sqlite-replset-secured: - stats: - pass: 2