Skip to content

Commit 38e871f

Browse files
JVM attack: add json label for MySQL config (#157)
Signed-off-by: xiang <[email protected]>
1 parent 84daf15 commit 38e871f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

cmd/attack/attack.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,5 @@ func NewAttackCommand() *cobra.Command {
4444

4545
func SetScheduleFlags(cmd *cobra.Command, conf *core.SchedulerConfig) {
4646
cmd.Flags().StringVar(&conf.Duration, "duration", "",
47-
`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".`)
47+
`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".`)
4848
}

pkg/core/jvm.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,19 +144,19 @@ type JVMStressSpec struct {
144144
// only when ((Database == "test" || Database == "") && (Table == "t1" || Table == "") && (SQLType == "select" || SQLType == "")) is true, chaosd will inject fault
145145
type JVMMySQLSpec struct {
146146
// the version of mysql-connector-java, only support 5.X.X(set to 5) and 8.X.X(set to 8) now
147-
MySQLConnectorVersion string
147+
MySQLConnectorVersion string `json:"mysql-connector-version,omitempty"`
148148

149149
// the match database
150150
// default value is "", means match all database
151-
Database string
151+
Database string `json:"database,omitempty"`
152152

153153
// the match table
154154
// default value is "", means match all table
155-
Table string
155+
Table string `json:"table,omitempty"`
156156

157157
// the match sql type
158158
// default value is "", means match all SQL type
159-
SQLType string
159+
SQLType string `json:"sql-type,omitempty"`
160160
}
161161

162162
type BytemanTemplateSpec struct {

0 commit comments

Comments
 (0)