@@ -56,6 +56,7 @@ def __init__(self, test_class: unittest.TestCase,
5656self .verbose = init_params .verbose
5757self .archive_compress = init_params .archive_compress
5858self .test_class .output = None
59+ self .execution_time = None
5960
6061def run (self ,command ,gdb = False ,old_binary = False ,return_id = True ,env = None ,
6162skip_log_directory = False ,expect_error = False ,use_backup_dir = True ):
@@ -113,11 +114,15 @@ def run(self, command, gdb=False, old_binary=False, return_id=True, env=None,
113114cmdline = ['gdbserver' ]+ ['localhost:' + str (gdb_port )]+ cmdline
114115print ("pg_probackup gdb suspended, waiting gdb connection on localhost:{0}" .format (gdb_port ))
115116
117+ start_time = time .time ()
116118self .test_class .output = subprocess .check_output (
117119cmdline ,
118120stderr = subprocess .STDOUT ,
119121env = env
120122 ).decode ('utf-8' ,errors = 'replace' )
123+ end_time = time .time ()
124+ self .execution_time = end_time - start_time
125+
121126if command [0 ]== 'backup' and return_id :
122127# return backup ID
123128for line in self .test_class .output .splitlines ():