Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
125448: workload: fix description of `seed` flag r=srosenberg a=renatolabs

The description previously stated that the `seed` command line flag needed to be the same for the `init` and `run` commands. However, that is inaccurate, as it is only true for some workloads (such as `rand`). For most workloads, there is no coupling between `init` and `run`, so they are allowed to use different seeds.

Epic: none

Release note: None

Co-authored-by: Renato Costa <renato@cockroachlabs.com>
  • Loading branch information
craig[bot] and renatolabs committed Jun 11, 2024
2 parents 2ce9380 + a643e40 commit c4e4d96
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions pkg/workload/rand/rand.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ import (
"github.com/spf13/pflag"
)

// NOTE: the caller is expected to pass the same seed on `init` and
// `run` when using this workload.
var RandomSeed = workload.NewInt64RandomSeed()

type random struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/workload/random.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (

const (
flagName = "seed"
flagDescription = "Random seed. Must be the same in 'init' and 'run'. Default changes in each run"
flagDescription = "Random seed. Default changes in each run"
)

// RandomSeed is the interface used by the workload runner to print
Expand Down

0 comments on commit c4e4d96

Please sign in to comment.