Mark a starting point
End and measure
Once the job has completed you can tell the performance api to create a measurement between the current time and the mark you ceated earlier.
Grab the details
You can then get all the measurement information.
here is an example of the output