As part of the Shotgun event plugin, a job can add its time spent rendering to a Shotgun entity’s field for later reference. We’re looking at using this information now as some of our renders are very slow and we want to be able to distinguish the long renders from the short ones. However I’m not quite sure what the number is based on.
We started a render at around 9am this morning, which finished around 1pm. However the job was reporting over 6 hours rendering time. Is this somehow affected by simultaneous different processes running together? ie. Is it taking the sum of all the tasks executed, rather than trying to discern the actual span of time that was spent on the rendering?
Alternatively our repository set up may be the issue. We designed our repository so that all jobs for scenes are submitted in advance. Every time you want a render, a job is requeued rather than submitted/created. Could this be affecting the TaskTotalTime figure, perhaps making a cumulative effect?
Just understanding what the figure corresponds to would be helpful, so we can discern what the figure actually tells us.
You are correct in your first assumption – the total Task Time of a Job is the amount of time spent rendering each task, added up. So if the Slaves are rendering multiple tasks at once (usually the case), this value could be higher than the ‘wall clock’ time. Some people find this value more useful, to separate the complexity of a completed Job from the amount of Slaves that were available to render it at the time.
It sounds like you’re looking for the Job’s running time – the value shows up in the Monitor as ‘Clock running time’. We unfortunately don’t have a dedicated property for this, so you will have to derive it from the Job’s Start Time and Finished Time (ie, FinishedTime - StartTime), which is how we get the value for display in the Monitor.
Thanks for the info Jon. Unfortunately the StartTime wont work for us. It’s based on when the Job first started rendering, not on subsequent requeues. ie. If we render it first on Tuesday then do another render on Thursday, it still counts the StartTime as being Tuesday and would claim the render took multiple days.
We’ll probably have to look into tracking the times from outside deadline instead since our usage doesn’t fit how it reports times.
Right, makes sense. Might make sense for us to have a similar function to GetJobTaskTotalTime that just finds at the current earliest Task Start Time, and subtracts it from the latest Task Finish Time – is that basically what you’d be looking to do, or are you only requeueing a subset of a Job’s Tasks?
I think that would be the most helpful option if possible.
In our case we do sometimes only requeue sections of the job rather than the whole thing, so I think that does complicate how you could get it to work for us. We might just set up something instead that logs the time when we requeue and compares to that when the job is finished. Thanks for the information anyway Jon!