mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-02 11:07:10 +00:00
feat(cli): add --max-steps for step-bounded runs
runner.Options.MaxSteps already worked but was unreachable from the command line. A step budget is what makes two generators comparable: one making a model call per step and one drawing from a PRNG are not comparable per second. Claude-Session: https://claude.ai/code/session_01A5KmftdEJ49A9z5mF5ESrX
This commit is contained in:
1 parent
26b49b379a
commit
8388ac5d2a
4 files changed
+51
-1
No files matched your search
@@ -31,6 +31,7 @@ type Options struct {
|
||||
IosAppPath string
|
||||
AndroidAppPath string
|
||||
Duration time.Duration
|
||||
MaxSteps int
|
||||
Seed int64
|
||||
Output string
|
||||
ClearData bool
|
||||
@@ -159,9 +160,14 @@ func Execute(ctx context.Context, options Options, stdout io.Writer) error {
|
||||
}()
|
||||
fmt.Fprintf(stdout, "trace dir: %s\n", runDirectory)
|
||||
|
||||
fmt.Fprintf(stdout, "running for %s (seed=%d)\n", options.Duration, seed)
|
||||
if options.MaxSteps > 0 {
|
||||
fmt.Fprintf(stdout, "running for %s or %d steps, whichever comes first (seed=%d)\n", options.Duration, options.MaxSteps, seed)
|
||||
} else {
|
||||
fmt.Fprintf(stdout, "running for %s (seed=%d)\n", options.Duration, seed)
|
||||
}
|
||||
summary, err := runner.Run(ctx, runner.Options{
|
||||
Duration: options.Duration,
|
||||
MaxSteps: options.MaxSteps,
|
||||
IdleTimeout: 1 * time.Second,
|
||||
BundleID: options.BundleID,
|
||||
Driver: activeDriver,
|
||||
|
||||
Reference in new issue
Block a user