-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improvement(jobs): job refactoring and randomization
1. Refactoring the Statement Generators into generators package 2. Each table gets it's own random number for validation and generation 3. Warmup consolidated into Job, runs with its own validator and statement generator -> propably can be removed, as Warmup is just a mutation without DDL and deletes Future Plans 1. Remove stopFlag as context.Context can do the same, hard kill is to CANCEL the Global Parent, and soft kill is cancelation of the current context 2. Generators Refactoring Signed-off-by: Dusan Malusev <[email protected]>
- Loading branch information
1 parent
eb177bc
commit 856d4fe
Showing
12 changed files
with
214 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ cmd/gemini/dist/ | |
bin/ | ||
coverage.txt | ||
dist/ | ||
results/*.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package jobs | ||
|
||
type Mode []string | ||
|
||
const ( | ||
WriteMode = "write" | ||
ReadMode = "read" | ||
MixedMode = "mixed" | ||
) | ||
|
||
func (m Mode) IsWrite() bool { | ||
return m[0] == WriteMode | ||
} | ||
|
||
func ModeFromString(m string) Mode { | ||
switch m { | ||
case WriteMode: | ||
return Mode{WriteMode} | ||
case ReadMode: | ||
return Mode{ReadMode} | ||
case MixedMode: | ||
return Mode{WriteMode, ReadMode} | ||
default: | ||
return Mode{} | ||
} | ||
} |
Oops, something went wrong.