MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / run_once

Function run_once

test/parallel-benchmark/mzcompose.py:377–554  ·  view source on GitHub ↗
(
    c: Composition,
    scenarios: list[type[Scenario]],
    service_names: list[str],
    tag: str | None,
    params: str | None,
    args,
    suffix: str,
    sqlite_store: bool,
)

Source from the content-addressed store, hash-verified

375
376
377def run_once(
378 c: Composition,
379 scenarios: list[type[Scenario]],
380 service_names: list[str],
381 tag: str | None,
382 params: str | None,
383 args,
384 suffix: str,
385 sqlite_store: bool,
386) -> tuple[dict[Scenario, dict[str, Statistics]], list[TestFailureDetails]]:
387 stats: dict[Scenario, dict[str, Statistics]] = {}
388 failures: list[TestFailureDetails] = []
389
390 overrides = []
391
392 if args.benchmarking_env:
393 assert not args.mz_url
394 assert not args.canary_env
395 region = "aws/us-east-1"
396 environment = os.getenv("ENVIRONMENT", "staging")
397 app_password = os.environ["QA_BENCHMARKING_APP_PASSWORD"]
398
399 target = PgConnInfo(
400 user="qabenchmarking",
401 password=app_password,
402 database="materialize",
403 # Service accounts can't use mz
404 host="4pe2w4etmpsnwx1iizersezg7.lb.us-east-1.aws.staging.materialize.cloud",
405 # host=get_cloud_hostname(
406 # c, region=region, environment=environment, app_password=app_password
407 # ),
408 port=6875,
409 ssl=True,
410 )
411 elif args.canary_env:
412 assert not args.mz_url
413 assert not args.benchmarking_env
414 region = "aws/us-east-1"
415 environment = os.getenv("ENVIRONMENT", "production")
416 app_password = os.environ["CANARY_LOADTEST_APP_PASSWORD"]
417
418 target = PgConnInfo(
419 user=os.getenv(
420 "CANARY_LOADTEST_USERNAME", "infra+qacanaryload@materialize.io"
421 ),
422 password=app_password,
423 database="materialize",
424 host=get_cloud_hostname(
425 c, region=region, environment=environment, app_password=app_password
426 ),
427 port=6875,
428 ssl=True,
429 )
430 elif args.mz_url:
431 overrides = [
432 Testdrive(
433 no_reset=True,
434 materialize_url=args.mz_url,

Callers 1

workflow_defaultFunction · 0.85

Calls 15

connectMethod · 0.95
PgConnInfoClass · 0.90
get_cloud_hostnameFunction · 0.90
TestdriveClass · 0.90
parse_pg_conn_stringFunction · 0.90
MaterializedClass · 0.90
image_registryFunction · 0.90
ServiceClass · 0.90
StateClass · 0.90
SQLiteStoreClass · 0.90
MemoryStoreClass · 0.90
overrideMethod · 0.80

Tested by

no test coverage detected