renaming Call -> Task (#70)

This commit is contained in:
Robert Nishihara
2016-05-26 16:33:30 -07:00
committed by Philipp Moritz
parent 7bfc070e29
commit 23d202bb73
12 changed files with 116 additions and 116 deletions
+3 -3
View File
@@ -14,7 +14,7 @@ class MicroBenchmarkTest(unittest.TestCase):
test_path = os.path.join(test_dir, "testrecv.py")
services.start_singlenode_cluster(return_drivers=False, num_workers_per_objstore=3, worker_path=test_path)
# measure the time required to submit a remote call to the scheduler
# measure the time required to submit a remote task to the scheduler
elapsed_times = []
for _ in range(1000):
start_time = time.time()
@@ -30,7 +30,7 @@ class MicroBenchmarkTest(unittest.TestCase):
print " worst: {}".format(elapsed_times[999])
self.assertTrue(average_elapsed_time < 0.00038)
# measure the time required to submit a remote call to the scheduler (where the remote call returns one value)
# measure the time required to submit a remote task to the scheduler (where the remote task returns one value)
elapsed_times = []
for _ in range(1000):
start_time = time.time()
@@ -46,7 +46,7 @@ class MicroBenchmarkTest(unittest.TestCase):
print " worst: {}".format(elapsed_times[999])
self.assertTrue(average_elapsed_time < 0.001)
# measure the time required to submit a remote call to the scheduler and pull the result
# measure the time required to submit a remote task to the scheduler and pull the result
elapsed_times = []
for _ in range(1000):
start_time = time.time()
+5 -5
View File
@@ -117,13 +117,13 @@ class ObjStoreTest(unittest.TestCase):
class SchedulerTest(unittest.TestCase):
def testCall(self):
def testRemoteTask(self):
test_dir = os.path.dirname(os.path.abspath(__file__))
test_path = os.path.join(test_dir, "testrecv.py")
[w] = services.start_singlenode_cluster(return_drivers=True, num_workers_per_objstore=1, worker_path=test_path)
value_before = "test_string"
objref = w.remote_call("test_functions.print_string", [value_before])
objref = w.submit_task("test_functions.print_string", [value_before])
time.sleep(0.2)
@@ -172,11 +172,11 @@ class APITest(unittest.TestCase):
test_path = os.path.join(test_dir, "testrecv.py")
[w] = services.start_singlenode_cluster(return_drivers=True, num_workers_per_objstore=3, worker_path=test_path)
objref = w.remote_call("test_functions.test_alias_f", [])
objref = w.submit_task("test_functions.test_alias_f", [])
self.assertTrue(np.alltrue(orchpy.pull(objref[0], w) == np.ones([3, 4, 5])))
objref = w.remote_call("test_functions.test_alias_g", [])
objref = w.submit_task("test_functions.test_alias_g", [])
self.assertTrue(np.alltrue(orchpy.pull(objref[0], w) == np.ones([3, 4, 5])))
objref = w.remote_call("test_functions.test_alias_h", [])
objref = w.submit_task("test_functions.test_alias_h", [])
self.assertTrue(np.alltrue(orchpy.pull(objref[0], w) == np.ones([3, 4, 5])))
services.cleanup()