Randoopy: add timer for MonkeyType executions
@@ -24,6 +24,7 @@ from pynguin.testcase.execution.monkeytypeexecutor import MonkeyTypeExecutor
from pynguin.utils.generic.genericaccessibleobject import (
GenericCallableAccessibleObject,
)
+from pynguin.utils.statistics.timer import Timer
class MonkeyTypeHandlerMixin:
@@ -51,6 +52,7 @@ class MonkeyTypeHandlerMixin:
:param test_case: The test case to execute
:param test_cluster: The underlying test cluster
"""
+ with Timer(name="MonkeyType execution", logger=None):
results = self._monkey_type_executor.execute(test_case)
for result in results:
self._update_type_inference(result, test_cluster)
@@ -72,6 +74,7 @@ class MonkeyTypeHandlerMixin:
:param test_suite: The test suite to execute
:param test_cluster: The underlying test cluster
"""
+ with Timer(name="MonkeyType execution", logger=None):
results = self._monkey_type_executor.execute_test_suite(test_suite)
for result in results:
self._update_type_inference(result, test_cluster)
