You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2007/03/28 15:52:09 UTC
svn commit: r523327 -
/tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/Catalina.java
Author: remm
Date: Wed Mar 28 06:52:08 2007
New Revision: 523327
URL: http://svn.apache.org/viewvc?view=rev&rev=523327
Log:
- Tweak startup time a bit.
Modified:
tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/Catalina.java
Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/Catalina.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/Catalina.java?view=diff&rev=523327&r1=523326&r2=523327
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/Catalina.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/startup/Catalina.java Wed Mar 28 06:52:08 2007
@@ -445,6 +445,8 @@
*/
public void load() {
+ long t1 = System.nanoTime();
+
initDirs();
// Before digester - it may be needed
@@ -453,9 +455,7 @@
// Create and execute our Digester
Digester digester = createStartDigester();
- long t1 = System.currentTimeMillis();
- Exception ex = null;
InputSource inputSource = null;
InputStream inputStream = null;
File file = null;
@@ -521,9 +521,9 @@
}
}
- long t2 = System.currentTimeMillis();
+ long t2 = System.nanoTime();
if(log.isInfoEnabled())
- log.info("Initialization processed in " + (t2 - t1) + " ms");
+ log.info("Initialization processed in " + ((t2 - t1) / 1000000) + " ms");
}
@@ -558,8 +558,8 @@
load();
}
- long t1 = System.currentTimeMillis();
-
+ long t1 = System.nanoTime();
+
// Start the new server
if (server instanceof Lifecycle) {
try {
@@ -569,9 +569,9 @@
}
}
- long t2 = System.currentTimeMillis();
+ long t2 = System.nanoTime();
if(log.isInfoEnabled())
- log.info("Server startup in " + (t2 - t1) + " ms");
+ log.info("Server startup in " + ((t2 - t1) / 1000000) + " ms");
try {
// Register shutdown hook
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org