workload.py 305 B

12345678910111213141516171819
  1. import time
  2. import ray
  3. ray.init("auto")
  4. @ray.remote(num_cpus=1)
  5. class A:
  6. def f(self):
  7. return 1
  8. actors = [A.remote() for _ in range(85)]
  9. # Keep calling actor methods which will generate lots of metrics.
  10. while True:
  11. time.sleep(0.1)
  12. ray.get([actor.f.remote() for actor in actors])