I would like to compare my script execution performance with and without running background jobs.
Is there any snippet available for measuring background job performance.
Perhaps you could encapsulate the Measure-Command scriptblock to include the following expression:
I think that would work for you.
So, I'm very sorry to revive this very old thread, but several Google searches let me here.
Here's what I figured out, about trying to measure background job performance.
It's actually stored as part of the job!
Here's what I did:
((Get-Job Job1).PSEndTime.TimeOfDay - (Get-Job Job1).PSBeginTime.TimeOfDay).TotalMinutes
To explore what else is available, use Get-Member. So run:
((Get-Job Job1).PSBeginTime.TimeOfDay) | Get-Member
Hope this helps someone!
You must be logged in to reply to this topic.