Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions cmd/stroppy/commands/gen/new.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import (
"github.com/spf13/cobra"
"go.uber.org/zap"

"github.com/stroppy-io/stroppy/examples"
"github.com/stroppy-io/stroppy/internal/common"
"github.com/stroppy-io/stroppy/internal/static"
"github.com/stroppy-io/stroppy/pkg/common/logger"
"github.com/stroppy-io/stroppy/workloads"
)

const (
Expand All @@ -41,7 +41,7 @@ Examples:
stroppy gen --workdir ./my-benchmark
stroppy gen --workdir ./my-benchmark --preset tpcc
stroppy gen --workdir ./my-benchmark --preset execute_sql
`, strings.Join(examples.AvailablePresets(), ", ")),
`, strings.Join(workloads.AvailablePresets(), ", ")),
RunE: func(cmd *cobra.Command, _ []string) error {
log := logger.Global().WithOptions(zap.WithCaller(false))

Expand Down Expand Up @@ -75,8 +75,8 @@ Examples:

// Copy preset if specified
if preset != "" {
presetType := examples.Preset(preset)
err = examples.CopyPresetToPath(output, presetType, common.FileMode)
presetType := workloads.Preset(preset)
err = workloads.CopyPresetToPath(output, presetType, common.FileMode)
if err != nil {
return fmt.Errorf("failed to copy preset: %w", err)
}
Expand Down Expand Up @@ -118,7 +118,9 @@ Examples:
)

// Log usage instructions
log.Info("Files included: stroppy.pb.ts, stroppy.pb.js, helpers.ts, parse_sql.ts, package.json, stroppy-k6, stroppy")
log.Info(
"Files included: stroppy.pb.ts, stroppy.pb.js, helpers.ts, parse_sql.ts, package.json, stroppy-k6, stroppy",
)

if preset != "" {
log.Info("Preset files included", zap.String("preset", preset))
Expand All @@ -141,6 +143,6 @@ func init() { //nolint: gochecknoinits // allow in cmd
Cmd.PersistentFlags().String(
presetFlagName,
"",
fmt.Sprintf("preset example to include (%s)", strings.Join(examples.AvailablePresets(), ", ")),
fmt.Sprintf("preset example to include (%s)", strings.Join(workloads.AvailablePresets(), ", ")),
)
}
4 changes: 2 additions & 2 deletions cmd/xk6air/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func (i *XK6Instance) DefineConfigBin(configBin []byte) {

// DefineConfig initializes the driver from GlobalConfig.
// This is called by scripts using defineConfig(globalConfig) at the top level.
func (i *XK6Instance) DefineConfig(globalCfg stroppy.GlobalConfig) {
func (i *XK6Instance) DefineConfig(globalCfg *stroppy.GlobalConfig) {

drvCfg := globalCfg.GetDriver()
if drvCfg == nil {
Expand All @@ -167,7 +167,7 @@ func (i *XK6Instance) DefineConfig(globalCfg stroppy.GlobalConfig) {
rootModule.cloudClient.NotifyRun(rootModule.ctx, &stroppy.StroppyRun{
Id: &stroppy.Ulid{Value: rootModule.runULID.String()},
Status: stroppy.Status_STATUS_RUNNING,
Config: &stroppy.ConfigFile{Global: &globalCfg},
Config: &stroppy.ConfigFile{Global: globalCfg},
Cmd: "",
})
})
Expand Down
109 changes: 0 additions & 109 deletions examples/embed.go

This file was deleted.

19 changes: 0 additions & 19 deletions examples/open.ts

This file was deleted.

Loading