mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-13 12:02:20 +00:00
overhead should include the time we spent waiting for the completion of asynchronous tasks
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@6631 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
43683fcf43
commit
6f5c1c1bfa
1 file changed
+3
-1
@@ -130,6 +130,7 @@ public abstract class MavenBuilder implements DelegatingCallable<Result,IOExcept
|
||||
|
||||
// now check the completion status of async ops
|
||||
boolean messageReported = false;
|
||||
long startTime = System.nanoTime();
|
||||
for (Future<?> f : futures) {
|
||||
try {
|
||||
if(!f.isDone() && !messageReported) {
|
||||
@@ -147,12 +148,13 @@ public abstract class MavenBuilder implements DelegatingCallable<Result,IOExcept
|
||||
e.printStackTrace(listener.error("Asynchronous execution failure"));
|
||||
}
|
||||
}
|
||||
a.overheadTime += System.nanoTime()-startTime;
|
||||
futures.clear();
|
||||
|
||||
if(profile) {
|
||||
NumberFormat n = NumberFormat.getInstance();
|
||||
PrintStream logger = listener.getLogger();
|
||||
logger.println("Total over head was "+format(n,a.overheadTime)+"ms");
|
||||
logger.println("Total overhead was "+format(n,a.overheadTime)+"ms");
|
||||
Channel ch = Channel.current();
|
||||
logger.println("Class loading " +format(n,ch.classLoadingTime.get()) +"ms, "+ch.classLoadingCount+" classes");
|
||||
logger.println("Resource loading "+format(n,ch.resourceLoadingTime.get())+"ms, "+ch.resourceLoadingCount+" times");
|
||||
|
||||
Reference in new issue
Block a user