axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/server AxisServer.java
Date Thu, 27 Jun 2002 23:06:14 GMT
stevel      2002/06/27 16:06:14

  Modified:    java/src/org/apache/axis/server AxisServer.java
  Log:
  timing from costin
  
  Revision  Changes    Path
  1.69      +42 -0     xml-axis/java/src/org/apache/axis/server/AxisServer.java
  
  Index: AxisServer.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/server/AxisServer.java,v
  retrieving revision 1.68
  retrieving revision 1.69
  diff -u -r1.68 -r1.69
  --- AxisServer.java	20 Jun 2002 16:48:19 -0000	1.68
  +++ AxisServer.java	27 Jun 2002 23:06:14 -0000	1.69
  @@ -79,6 +79,8 @@
   {
       protected static Log log =
           LogFactory.getLog(AxisServer.class.getName());
  +    private static Log tlog =
  +        LogFactory.getLog("org.apache.axis.TIME");
   
       private static AxisServerFactory factory = null;
       
  @@ -162,6 +164,11 @@
        * handler for the desired service and invoke() it.
        */
       public void invoke(MessageContext msgContext) throws AxisFault {
  +        long t0=0, t1=0, t2=0, t3=0, t4=0, t5=0;
  +        if( tlog.isDebugEnabled() ) {
  +            t0=System.currentTimeMillis();
  +        }
  +        
           if (log.isDebugEnabled()) {
               log.debug("Enter: AxisServer::invoke");
           }
  @@ -195,12 +202,21 @@
                           h = null ;
                       }
                   }
  +                if( tlog.isDebugEnabled() ) {
  +                    t1=System.currentTimeMillis();
  +                }
                   if ( h != null )
                       h.invoke(msgContext);
                   else
                       throw new AxisFault( "Server.error",
                                            JavaUtils.getMessage("noHandler00", hName),
                                            null, null );
  +                if( tlog.isDebugEnabled() ) {
  +                    t2=System.currentTimeMillis();
  +                    tlog.debug( "AxisServer.invoke " + hName + " invoke=" +
  +                                ( t2-t1 ) + " pre=" + (t1-t0 ));
  +                }
  +                
               }
               else {
                   // This really should be in a handler - but we need to discuss it
  @@ -247,6 +263,9 @@
                   if (log.isDebugEnabled())
                       log.debug(JavaUtils.getMessage("transport01", "AxisServer.invoke",
hName));
   
  +                if( tlog.isDebugEnabled() ) {
  +                    t1=System.currentTimeMillis();
  +                }
                   if ( hName != null && (h = getTransport( hName )) != null ) {
                       if (h instanceof SimpleTargetedChain) {
                           transportChain = (SimpleTargetedChain)h;
  @@ -256,6 +275,9 @@
                       }
                   }
   
  +                if( tlog.isDebugEnabled() ) {
  +                    t2=System.currentTimeMillis();
  +                }
                   /* Process the Global Request Chain */
                   /**********************************/
                   if ((h = getGlobalRequest()) != null )
  @@ -283,9 +305,16 @@
                                                                    "" + msgContext.getTargetService()),
                                               null, null );
                   }
  +                if( tlog.isDebugEnabled() ) {
  +                    t3=System.currentTimeMillis();
  +                }
   
                   h.invoke(msgContext);
   
  +                if( tlog.isDebugEnabled() ) {
  +                    t4=System.currentTimeMillis();
  +                }
  +
                   /* Process the Global Response Chain */
                   /***********************************/
                   if ((h = getGlobalResponse()) != null)
  @@ -298,6 +327,19 @@
                       if (h != null)
                           h.invoke(msgContext);
                   }
  +                
  +                if( tlog.isDebugEnabled() ) {
  +                    t5=System.currentTimeMillis();
  +                    tlog.debug( "AxisServer.invoke2 " +
  +                                " preTr=" +
  +                                ( t1-t0 ) + " tr=" + (t2-t1 ) +
  +                                " preInvoke=" + ( t3-t2 ) +
  +                                " invoke=" + ( t4-t3 ) +
  +                                " postInvoke=" + ( t5-t4 ) +
  +                                msgContext.getTargetService() +
  +                                "." + msgContext.getOperation().getName());
  +                }
  +
               }
           } catch (AxisFault e) {
               throw e;
  
  
  

Mime
View raw message