capture mean response time and save into a separate file

HI all, I need to run a load test where for each user, I need to capture the “mean response time” and save it to a comma delimited file.

note: I am saving to a file because I am capturing other data as the test runs and saving it as well. so eventually I would have something like this

file:
username | API Body string | transaction time
12345 | "[1,“find”,2,8,{“0” | 200 ms