@@ -56,6 +56,7 @@ def __init__(self, test_class: unittest.TestCase,
56
56
self .verbose = init_params .verbose
57
57
self .archive_compress = init_params .archive_compress
58
58
self .test_class .output = None
59
+ self .execution_time = None
59
60
60
61
def run (self ,command ,gdb = False ,old_binary = False ,return_id = True ,env = None ,
61
62
skip_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,
113
114
cmdline = ['gdbserver' ]+ ['localhost:' + str (gdb_port )]+ cmdline
114
115
print ("pg_probackup gdb suspended, waiting gdb connection on localhost:{0}" .format (gdb_port ))
115
116
117
+ start_time = time .time ()
116
118
self .test_class .output = subprocess .check_output (
117
119
cmdline ,
118
120
stderr = subprocess .STDOUT ,
119
121
env = env
120
122
).decode ('utf-8' ,errors = 'replace' )
123
+ end_time = time .time ()
124
+ self .execution_time = end_time - start_time
125
+
121
126
if command [0 ]== 'backup' and return_id :
122
127
# return backup ID
123
128
for line in self .test_class .output .splitlines ():