A general framework for longevity and stress testing
(c: Composition, parser: WorkflowArgumentParser)
| 135 | |
| 136 | |
| 137 | def workflow_default(c: Composition, parser: WorkflowArgumentParser) -> None: |
| 138 | """A general framework for longevity and stress testing""" |
| 139 | |
| 140 | c.silent = True |
| 141 | |
| 142 | parser.add_argument( |
| 143 | "--scenario", |
| 144 | metavar="SCENARIO", |
| 145 | type=str, |
| 146 | help="Scenario to run", |
| 147 | required=True, |
| 148 | ) |
| 149 | |
| 150 | parser.add_argument( |
| 151 | "--seed", metavar="N", type=int, help="Random seed", default=int(time.time()) |
| 152 | ) |
| 153 | |
| 154 | parser.add_argument( |
| 155 | "--actions", |
| 156 | metavar="N", |
| 157 | type=int, |
| 158 | help="Number of actions to run", |
| 159 | default=1000, |
| 160 | ) |
| 161 | |
| 162 | parser.add_argument( |
| 163 | "--max-execution-time", metavar="XhYmZs", type=parse_timedelta, default="1d" |
| 164 | ) |
| 165 | |
| 166 | parser.add_argument( |
| 167 | "--transaction-isolation", |
| 168 | type=TransactionIsolation, |
| 169 | choices=list(TransactionIsolation), |
| 170 | default=TransactionIsolation.STRICT_SERIALIZABLE, |
| 171 | ) |
| 172 | |
| 173 | parser.add_argument( |
| 174 | "--cockroach-tag", |
| 175 | type=str, |
| 176 | default=Cockroach.DEFAULT_COCKROACH_TAG, |
| 177 | help="Cockroach DockerHub tag to use.", |
| 178 | ) |
| 179 | |
| 180 | parser.add_argument( |
| 181 | "--observability", |
| 182 | action="store_true", |
| 183 | help="Start Prometheus and Grafana", |
| 184 | ) |
| 185 | |
| 186 | parser.add_argument( |
| 187 | "--azurite", action="store_true", help="Use Azurite as blob store instead of S3" |
| 188 | ) |
| 189 | |
| 190 | args = parser.parse_args() |
| 191 | scenario_class = globals()[args.scenario] |
| 192 | |
| 193 | dependencies = [ |
| 194 | "redpanda", |
nothing calls this directly
no test coverage detected