@@ -224,20 +224,16 @@ def do_tests():
224
224
print ('float32/gpu' , float32_times / gpu_times , file = sys .stderr )
225
225
226
226
# Generate JUnit performance report
227
- # Define speedtest file write method
228
- def write_junit (f , algos , times , label ):
229
- for algo , time in zip (algos , times ):
230
- f .write (' <testcase classname="{label}" name="{algo}" time="{time}">'
231
- .format (label = label , algo = algo , time = time ))
232
- f .write (' </testcase>\n ' )
233
-
234
- with open ('speedtests_time.xml' , 'w' ) as f :
235
- f .write ('<?xml version="1.0" encoding="UTF-8"?>\n ' )
236
- f .write ('<testsuite name="dlt_speedtests" tests="{ntests}">\n '
237
- .format (ntests = test_total ))
238
- for label , times in times_dic .items ():
239
- write_junit (f , algo_executed , times , label )
240
- f .write ('</testsuite>\n ' )
227
+ for label , times in times_dic .items ():
228
+ with open ('speedtests_{label}.xml' .format (label = label ), 'w' ) as f :
229
+ f .write ('<?xml version="1.0" encoding="UTF-8"?>\n ' )
230
+ f .write ('<testsuite name="dlt_speedtests_{label}" tests="{ntests}">\n '
231
+ .format (label = label , ntests = test_total / len (times_dic )))
232
+ for algo , time in zip (algo_executed , times ):
233
+ f .write (' <testcase classname="speed" name="{algo}" time="{time}">'
234
+ .format (label = label , algo = algo , time = time ))
235
+ f .write (' </testcase>\n ' )
236
+ f .write ('</testsuite>\n ' )
241
237
242
238
if do_gpu :
243
239
assert not numpy .isnan (gpu_times ).any ()
0 commit comments