mirror of
https://github.com/wassname/ray.git
synced 2026-07-02 08:46:59 +08:00
[asv] Add benchmark for ray.wait (#2625)
* Add benchmarks for ray.wait * Fix bug
This commit is contained in:
committed by
Philipp Moritz
parent
244337d381
commit
230b9ab33b
@@ -3,7 +3,6 @@ from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
import ray
|
||||
import ray.test.test_functions as test_functions
|
||||
|
||||
|
||||
def setup():
|
||||
@@ -12,6 +11,11 @@ def setup():
|
||||
setup.is_initialized = True
|
||||
|
||||
|
||||
@ray.remote
|
||||
def trivial_function():
|
||||
return 1
|
||||
|
||||
|
||||
class TimeSuite(object):
|
||||
"""An example benchmark."""
|
||||
|
||||
@@ -37,10 +41,10 @@ class MemSuite(object):
|
||||
|
||||
class MicroBenchmarkSuite(object):
|
||||
def time_submit(self):
|
||||
test_functions.empty_function.remote()
|
||||
trivial_function.remote()
|
||||
|
||||
def time_submit_and_get(self):
|
||||
x = test_functions.trivial_function.remote()
|
||||
x = trivial_function.remote()
|
||||
ray.get(x)
|
||||
|
||||
def time_put(self):
|
||||
|
||||
Reference in New Issue
Block a user