Skip to content

Commit

Permalink
JVM attack: add json label for MySQL config (#157)
Browse files Browse the repository at this point in the history
Signed-off-by: xiang <xiang13225080@163.com>
  • Loading branch information
WangXiangUSTC committed Apr 28, 2022
1 parent 84daf15 commit 38e871f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cmd/attack/attack.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,5 @@ func NewAttackCommand() *cobra.Command {

func SetScheduleFlags(cmd *cobra.Command, conf *core.SchedulerConfig) {
cmd.Flags().StringVar(&conf.Duration, "duration", "",
`Work duration of attacks.A duration string is a possibly signed sequence of decimal numbers, each with optional fraction and a unit suffix, such as "300ms", "-1.5h" or "2h45m".Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".`)
`Work duration of attacks.A duration string is a possibly signed sequence of decimal numbers, each with optional fraction and a unit suffix, such as "300ms", "1.5h" or "2h45m".Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".`)
}
8 changes: 4 additions & 4 deletions pkg/core/jvm.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,19 +144,19 @@ type JVMStressSpec struct {
// only when ((Database == "test" || Database == "") && (Table == "t1" || Table == "") && (SQLType == "select" || SQLType == "")) is true, chaosd will inject fault
type JVMMySQLSpec struct {
// the version of mysql-connector-java, only support 5.X.X(set to 5) and 8.X.X(set to 8) now
MySQLConnectorVersion string
MySQLConnectorVersion string `json:"mysql-connector-version,omitempty"`

// the match database
// default value is "", means match all database
Database string
Database string `json:"database,omitempty"`

// the match table
// default value is "", means match all table
Table string
Table string `json:"table,omitempty"`

// the match sql type
// default value is "", means match all SQL type
SQLType string
SQLType string `json:"sql-type,omitempty"`
}

type BytemanTemplateSpec struct {
Expand Down

0 comments on commit 38e871f

Please sign in to comment.