Skip to content

Commit 97d33bb

Browse files
committed
Updated dictionary names for results dict
1 parent 2b0a6e2 commit 97d33bb

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

nipype/interfaces/tests/test_runtime_profiler.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ def _collect_range_runtime_stats(self, num_threads):
166166
func_runtime_gb = float(func_node_stats['runtime_memory_gb'])
167167

168168
# Calc errors
169-
cmd_threads_err = cmd_threads_threads - num_threads
169+
cmd_threads_err = cmd_runtime_threads - num_threads
170170
cmd_gb_err = cmd_runtime_gb - num_gb
171171
func_threads_err = func_runtime_threads - num_threads
172172
func_gb_err = func_runtime_gb - num_gb
@@ -178,9 +178,9 @@ def _collect_range_runtime_stats(self, num_threads):
178178
'cmd_runtime_gb' : cmd_runtime_gb,
179179
'func_runtime_threads' : func_runtime_threads,
180180
'func_runtime_gb' : func_runtime_gb,
181-
'cmd_thread_err' : cmd_thread_err,
181+
'cmd_threads_err' : cmd_threads_err,
182182
'cmd_gb_err' : cmd_gb_err,
183-
'func_thread_err' : func_thread_err,
183+
'func_threads_err' : func_threads_err,
184184
'func_gb_err' : func_gb_err}
185185
# Append to list
186186
dict_list.append(results_dict)
@@ -191,11 +191,11 @@ def _collect_range_runtime_stats(self, num_threads):
191191
# Return dataframe
192192
return runtime_results_df
193193

194-
def tiest_collect_range(self):
195-
num_threads = 1
196-
df = self._collect_range_suntime_stats(num_threads)
194+
def test_collect_range(self):
195+
num_threads = 8
196+
df = self._collect_range_runtime_stats(num_threads)
197197

198-
df.to_csv('/root/%d_thread_df.csv')
198+
df.to_csv('/root/%d_thread_df.csv' % num_threads)
199199

200200
# Test node
201201
def _run_cmdline_workflow(self, num_gb, num_threads):
@@ -349,7 +349,7 @@ def _run_function_workflow(self, num_gb, num_threads):
349349

350350
# Test resources were used as expected in cmdline interface
351351
@unittest.skipIf(run_profiler == False, skip_profile_msg)
352-
def test_cmdline_profiling(self):
352+
def tiest_cmdline_profiling(self):
353353
'''
354354
Test runtime profiler correctly records workflow RAM/CPUs consumption
355355
from a cmdline function
@@ -391,7 +391,7 @@ def test_cmdline_profiling(self):
391391

392392
# Test resources were used as expected
393393
@unittest.skipIf(run_profiler == False, skip_profile_msg)
394-
def test_function_profiling(self):
394+
def tiest_function_profiling(self):
395395
'''
396396
Test runtime profiler correctly records workflow RAM/CPUs consumption
397397
from a python function

0 commit comments

Comments
 (0)