|
@@ -92,17 +92,17 @@ private:
|
|
{
|
|
{
|
|
const unsigned clusterWidth = queryNodeClusterWidth();
|
|
const unsigned clusterWidth = queryNodeClusterWidth();
|
|
const cost_type sgCost = money2cost_type(calcCost(thorManagerRate, duration) + calcCost(thorWorkerRate, duration) * clusterWidth);
|
|
const cost_type sgCost = money2cost_type(calcCost(thorManagerRate, duration) + calcCost(thorWorkerRate, duration) * clusterWidth);
|
|
|
|
+ cost_type costDiskAccess = graph.getDiskAccessCost();
|
|
if (finished)
|
|
if (finished)
|
|
{
|
|
{
|
|
if (sgCost)
|
|
if (sgCost)
|
|
wu->setStatistic(queryStatisticsComponentType(), queryStatisticsComponentName(), SSTsubgraph, graphScope, StCostExecute, NULL, sgCost, 1, 0, StatsMergeReplace);
|
|
wu->setStatistic(queryStatisticsComponentType(), queryStatisticsComponentName(), SSTsubgraph, graphScope, StCostExecute, NULL, sgCost, 1, 0, StatsMergeReplace);
|
|
- cost_type costDiskAccess = graph.getDiskAccessCost();
|
|
|
|
if (costDiskAccess)
|
|
if (costDiskAccess)
|
|
wu->setStatistic(queryStatisticsComponentType(), queryStatisticsComponentName(), SSTsubgraph, graphScope, StCostFileAccess, NULL, costDiskAccess, 1, 0, StatsMergeReplace);
|
|
wu->setStatistic(queryStatisticsComponentType(), queryStatisticsComponentName(), SSTsubgraph, graphScope, StCostFileAccess, NULL, costDiskAccess, 1, 0, StatsMergeReplace);
|
|
}
|
|
}
|
|
|
|
|
|
- const cost_type totalCost = workunitCost + sgCost;
|
|
|
|
- if (costLimit>0.0 && totalCost > costLimit)
|
|
|
|
|
|
+ const cost_type totalCost = workunitCost + sgCost + costDiskAccess;
|
|
|
|
+ if (costLimit>0 && totalCost > costLimit)
|
|
{
|
|
{
|
|
LOG(MCwarning, thorJob, "ABORT job cost exceeds limit");
|
|
LOG(MCwarning, thorJob, "ABORT job cost exceeds limit");
|
|
graph.fireException(MakeThorException(TE_CostExceeded, "Job cost exceeds limit"));
|
|
graph.fireException(MakeThorException(TE_CostExceeded, "Job cost exceeds limit"));
|