Skip to content

Commit 7e500b3

Browse files
committed
run finished after x seconds
1 parent a2a6126 commit 7e500b3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

perfTest/cmd/commands.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ var (
4141
batchSize int
4242
exitOnError bool
4343
debugLogs bool
44-
ttl int
44+
runDuration int
4545
)
4646

4747
func init() {
@@ -59,15 +59,15 @@ func setupCli(baseCmd *cobra.Command) {
5959
baseCmd.PersistentFlags().IntVarP(&variableRate, "variable-rate", "", 0, "Variable rate to value")
6060
baseCmd.PersistentFlags().IntVarP(&variableBody, "variable-body", "", 0, "Variable body size")
6161
baseCmd.PersistentFlags().IntVarP(&fixedBody, "fixed-body", "", 0, "Body size")
62-
baseCmd.PersistentFlags().IntVarP(&ttl, "ttl", "", 0, "Minutes Time to live ( stop the test)")
62+
baseCmd.PersistentFlags().IntVarP(&runDuration, "time", "", 0, "Run Duration in seconds ( stop the test)")
6363
baseCmd.PersistentFlags().BoolVarP(&exitOnError, "exit-on-error", "", true, "Close the app in case of error")
6464
baseCmd.PersistentFlags().BoolVarP(&printStatsV, "print-stats", "", true, "Print stats")
6565
baseCmd.PersistentFlags().BoolVarP(&debugLogs, "debug-logs", "", false, "Enable debug logs")
6666
baseCmd.PersistentFlags().StringSliceVarP(&streams, "streams", "", []string{"perf-test-go"}, "Stream names")
6767
baseCmd.PersistentFlags().StringVarP(&maxLengthBytes, "max-length-bytes", "", "0", "Stream max length bytes, e.g. 10MB, 50GB, etc.")
6868
baseCmd.PersistentFlags().IntVarP(&maxAge, "max-age", "", 0, "Stream Age in hours, e.g. 1,2.. 24 , etc.")
6969
baseCmd.PersistentFlags().StringVarP(&maxSegmentSizeBytes, "stream-max-segment-size-bytes", "", "500MB", "Stream segment size bytes, e.g. 10MB, 1GB, etc.")
70-
baseCmd.PersistentFlags().StringVarP(&consumerOffset, "consumer-offset", "", "first", "Staring consuming, ex: first,last,next of number")
70+
baseCmd.PersistentFlags().StringVarP(&consumerOffset, "consumer-offset", "", "first", "Staring consuming, ex: first,last,next or random")
7171
baseCmd.AddCommand(versionCmd)
7272
baseCmd.AddCommand(newSilent())
7373
}

0 commit comments

Comments
 (0)