未验证 提交 39bd2fb5 编写于 作者: T tangwei12 提交者: GitHub

add print test_dist UT elapsed time (#26397)

* add print test_dist UT elapsed time

* UT elapsed time optimize
上级 9bcfc1a8
......@@ -57,7 +57,7 @@ class FleetDistRunnerBase(object):
if args.role.upper() == "PSERVER":
role = role_maker.UserDefinedRoleMaker(
is_collective=False,
init_gloo=True,
init_gloo=False,
path=args.gloo_path,
current_id=args.current_id,
role=role_maker.Role.SERVER,
......@@ -66,7 +66,7 @@ class FleetDistRunnerBase(object):
else:
role = role_maker.UserDefinedRoleMaker(
is_collective=False,
init_gloo=True,
init_gloo=False,
path=args.gloo_path,
current_id=args.current_id,
role=role_maker.Role.WORKER,
......@@ -160,7 +160,13 @@ class TestFleetBase(unittest.TestCase):
def _setup_config(self):
raise NotImplementedError("tests should have _setup_config implemented")
def tearDown(self):
t = time.time() - self.startTime
print('%s: %.3f' % (self.__class__.__name__, t))
def setUp(self):
self.startTime = time.time()
self._mode = "sync"
self._reader = "pyreader"
self._trainers = 2
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册