Adds log information about candidate harvest time for each harvester.
This commit is contained in:
parent
bdce4653bd
commit
6d42555340
@ -105,6 +105,7 @@ public class CandidateHarvesterSet
|
|||||||
final Component component,
|
final Component component,
|
||||||
ExecutorService executorService)
|
ExecutorService executorService)
|
||||||
{
|
{
|
||||||
|
long startCandidateHarvestTime = System.currentTimeMillis();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a task to be executed by the specified executorService and
|
* Represents a task to be executed by the specified executorService and
|
||||||
@ -276,6 +277,15 @@ public class CandidateHarvesterSet
|
|||||||
}
|
}
|
||||||
taskIter.remove();
|
taskIter.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
long stopCandidateHarvestTime = System.currentTimeMillis();
|
||||||
|
long candidateHarvestTime
|
||||||
|
= stopCandidateHarvestTime - startCandidateHarvestTime;
|
||||||
|
logger.info(
|
||||||
|
"End candidate harvest for all harvesters within "
|
||||||
|
+ candidateHarvestTime + " ms"
|
||||||
|
+ ", component:\n\t"
|
||||||
|
+ component);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -405,9 +415,22 @@ public class CandidateHarvesterSet
|
|||||||
{
|
{
|
||||||
if (isEnabled())
|
if (isEnabled())
|
||||||
{
|
{
|
||||||
|
long startCandidateHarvestTime = System.currentTimeMillis();
|
||||||
|
|
||||||
Collection<LocalCandidate> candidates
|
Collection<LocalCandidate> candidates
|
||||||
= harvester.harvest(component);
|
= harvester.harvest(component);
|
||||||
|
|
||||||
|
long stopCandidateHarvestTime = System.currentTimeMillis();
|
||||||
|
long candidateHarvestTime
|
||||||
|
= stopCandidateHarvestTime - startCandidateHarvestTime;
|
||||||
|
logger.info(
|
||||||
|
"End candidate harvest within "
|
||||||
|
+ candidateHarvestTime
|
||||||
|
+ " ms, for "
|
||||||
|
+ harvester.getClass().getName()
|
||||||
|
+ ", component:\n\t"
|
||||||
|
+ component);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If the CandidateHarvester has not gathered any candidates, it
|
* If the CandidateHarvester has not gathered any candidates, it
|
||||||
* is considered failed and will not be used again in order to
|
* is considered failed and will not be used again in order to
|
||||||
|
|||||||
@ -64,6 +64,8 @@ public class HostCandidateHarvester
|
|||||||
throws IllegalArgumentException,
|
throws IllegalArgumentException,
|
||||||
IOException
|
IOException
|
||||||
{
|
{
|
||||||
|
long startCandidateHarvestTime = System.currentTimeMillis();
|
||||||
|
|
||||||
Enumeration<NetworkInterface> interfaces
|
Enumeration<NetworkInterface> interfaces
|
||||||
= NetworkInterface.getNetworkInterfaces();
|
= NetworkInterface.getNetworkInterfaces();
|
||||||
|
|
||||||
@ -169,6 +171,17 @@ public class HostCandidateHarvester
|
|||||||
+ " minPort=" + minPort
|
+ " minPort=" + minPort
|
||||||
+ " maxPort=" + maxPort);
|
+ " maxPort=" + maxPort);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
long stopCandidateHarvestTime = System.currentTimeMillis();
|
||||||
|
long candidateHarvestTime
|
||||||
|
= stopCandidateHarvestTime - startCandidateHarvestTime;
|
||||||
|
logger.info(
|
||||||
|
"End candidate harvest within "
|
||||||
|
+ candidateHarvestTime
|
||||||
|
+ " ms, for "
|
||||||
|
+ this.getClass().getName()
|
||||||
|
+ ", component:\n\t"
|
||||||
|
+ component);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user