|
@@ -84,6 +84,8 @@ namespace AssetProcessor
|
|
|
return tr("Job Key");
|
|
|
case ColumnCompleted:
|
|
|
return tr("Completed");
|
|
|
+ case ColumnProcessDuration:
|
|
|
+ return tr("Last Process Duration (ms)");
|
|
|
default:
|
|
|
break;
|
|
|
}
|
|
@@ -175,6 +177,8 @@ namespace AssetProcessor
|
|
|
{
|
|
|
return getItem(index.row())->m_completedTime.toString("hh:mm:ss.zzz MMM dd, yyyy");
|
|
|
}
|
|
|
+ case ColumnProcessDuration:
|
|
|
+ return getItem(index.row())->m_processDuration;
|
|
|
default:
|
|
|
break;
|
|
|
}
|
|
@@ -443,6 +447,20 @@ namespace AssetProcessor
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ void JobsModel::OnJobProcessDurationChanged(JobEntry jobEntry, unsigned int duration)
|
|
|
+ {
|
|
|
+ QueueElementID elementId(jobEntry.m_databaseSourceName, jobEntry.m_platformInfo.m_identifier.c_str(), jobEntry.m_jobKey);
|
|
|
+
|
|
|
+ if (auto iter = m_cachedJobsLookup.find(elementId); iter != m_cachedJobsLookup.end())
|
|
|
+ {
|
|
|
+ unsigned int jobIndex = iter.value();
|
|
|
+ CachedJobInfo* jobInfo = m_cachedJobs[jobIndex];
|
|
|
+ jobInfo->m_processDuration = aznumeric_cast<AZ::u32>(duration);
|
|
|
+ Q_EMIT dataChanged(
|
|
|
+ index(jobIndex, ColumnProcessDuration, QModelIndex()), index(jobIndex, ColumnProcessDuration, QModelIndex()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
void JobsModel::OnSourceRemoved(QString sourceDatabasePath)
|
|
|
{
|
|
|
// when a source is removed, we need to eliminate all job entries for that source regardless of all other details of it.
|