You can use this awk:
cat file
Number of Iterations: 150
Average time is 45 ms
Average time for collisions is 50 ms
Total time is 95 ms
Number of Iterations: 200
Average time is 40 ms
Average time for collisions is 60 ms
Total time is 100 ms
awk '/^Total/{p=1} {gsub(/[^0-9]+/, ""); a[++i]=$0}
p{print a[1], a[2], a[3], a[4]; p=0; delete a; i=0}' OFS=, file
150,45,50,95
200,40,60,100