periodic.py 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # Copyright Materialize, Inc. and contributors. All rights reserved.
  2. #
  3. # Use of this software is governed by the Business Source License
  4. # included in the LICENSE file at the root of this repository.
  5. #
  6. # As of the Change Date specified in that file, in accordance with
  7. # the Business Source License, use of this software will be governed
  8. # by the Apache License, Version 2.0.
  9. import datetime
  10. from materialize import scratch
  11. def main() -> None:
  12. desc = scratch.MachineDesc(
  13. name="chbench monthly",
  14. launch_script="bin/mzcompose --preserve-ports --find chbench run load-test",
  15. instance_type="r5ad.4xlarge",
  16. ami="ami-0aeb7c931a5a61206",
  17. tags={
  18. "scrape_benchmark_numbers": "true",
  19. "lt_name": "monthly-chbench",
  20. "purpose": "load_test_monthly",
  21. "mzconduct_workflow": "load-test",
  22. "test": "chbench",
  23. "environment": "scratch",
  24. },
  25. size_gb=64,
  26. )
  27. now = datetime.datetime.utcnow()
  28. scratch.launch_cluster(
  29. [desc],
  30. nonce=now.replace(tzinfo=datetime.UTC).isoformat(),
  31. # Keep alive for at least a day.
  32. delete_after=datetime.datetime.utcnow() + datetime.timedelta(days=1),
  33. )
  34. if __name__ == "__main__":
  35. main()