Package railo.runtime.debug

Examples of railo.runtime.debug.DebugEntryTemplate


    // INFO duplicate code is for faster execution -> less contions
   
   
    // debug yes
    if(pc.getConfig().debug()) {
        DebugEntryTemplate debugEntry=pc.getDebugger().getEntry(pc,pageSource,udf.getFunctionName());//new DebugEntry(src,udf.getFunctionName());
      int currTime=pc.getExecutionTime();
      long time=System.nanoTime();
     
      // sync yes
      if(top.properties._synchronized){
        synchronized (this) {
          try {
            parent=beforeCall(pc);
            if(args!=null)rtn=udf.call(pc,calledName,args,true);
            else rtn=udf.callWithNamedValues(pc,calledName,namedArgs,true);
          }   
          finally {
            pc.setVariablesScope(parent);
            int diff= ((int)(System.nanoTime()-time)-(pc.getExecutionTime()-currTime));
            pc.setExecutionTime(pc.getExecutionTime()+diff);
            debugEntry.updateExeTime(diff)
         
        }
      }

      // sync no
      else {
        try {
          parent=beforeCall(pc);
          if(args!=null)rtn=udf.call(pc,calledName,args,true);
          else rtn=udf.callWithNamedValues(pc,calledName,namedArgs,true);
        }   
        finally {
          pc.setVariablesScope(parent);
          int diff= ((int)(System.nanoTime()-time)-(pc.getExecutionTime()-currTime));
          pc.setExecutionTime(pc.getExecutionTime()+diff);
          debugEntry.updateExeTime(diff)
       
      }
     
     
    }
View Full Code Here


    return loadInterface(pc,page, ps, callPath, isRealPath, interfaceUDFs);
  }
 
  public static Page loadPage(PageContext pc,PageSource ps, boolean forceReload) throws PageException  {
    if(pc.getConfig().debug()) {
            DebugEntryTemplate debugEntry=pc.getDebugger().getEntry(pc,ps);
            pc.addPageSource(ps,true);
           
            int currTime=pc.getExecutionTime();
            long exeTime=0;
            long time=System.currentTimeMillis();
            try {
              debugEntry.updateFileLoadTime((int)(System.currentTimeMillis()-time));
              exeTime=System.currentTimeMillis();
                return ((PageSourceImpl)ps).loadPage(pc,forceReload);
            }
            finally {
                int diff= ((int)(System.currentTimeMillis()-exeTime)-(pc.getExecutionTime()-currTime));
                pc.setExecutionTime(pc.getExecutionTime()+(int)(System.currentTimeMillis()-time));
                debugEntry.updateExeTime(diff);
                pc.removeLastPageSource(true);
            }
        }
    // no debug
        pc.addPageSource(ps,true);
View Full Code Here

    }

  public static ComponentImpl loadComponent(PageContext pc,Page page, PageSource ps,String callPath, boolean isRealPath) throws PageException  {
        ComponentImpl rtn=null;
        if(pc.getConfig().debug()) {
            DebugEntryTemplate debugEntry=pc.getDebugger().getEntry(pc,ps);
            pc.addPageSource(ps,true);
           
            int currTime=pc.getExecutionTime();
            long exeTime=0;
            long time=System.nanoTime();
            try {
              debugEntry.updateFileLoadTime((int)(System.nanoTime()-time));
              exeTime=System.nanoTime();
                if(page==null)page=((PageSourceImpl)ps).loadPage(pc);
              rtn=initComponent(pc,page,callPath,isRealPath);
               
               
            }
            finally {
              if(rtn!=null)rtn.setLoaded(true);
              int diff= ((int)(System.nanoTime()-exeTime)-(pc.getExecutionTime()-currTime));
                pc.setExecutionTime(pc.getExecutionTime()+(int)(System.nanoTime()-time));
                debugEntry.updateExeTime(diff);
                pc.removeLastPageSource(true);
            }
        }
    // no debug
        else {
View Full Code Here

    }
 
    public static InterfaceImpl loadInterface(PageContext pc,Page page, PageSource ps,String callPath, boolean isRealPath, Map interfaceUDFs) throws PageException  {
      InterfaceImpl rtn=null;
        if(pc.getConfig().debug()) {
            DebugEntryTemplate debugEntry=pc.getDebugger().getEntry(pc,ps);
            pc.addPageSource(ps,true);
           
            int currTime=pc.getExecutionTime();
            long exeTime=0;
            long time=System.nanoTime();
            try {
                debugEntry.updateFileLoadTime((int)(System.nanoTime()-time));
                exeTime=System.nanoTime();
              if(page==null)page=((PageSourceImpl)ps).loadPage(pc);
              rtn=initInterface(pc,page,callPath,isRealPath,interfaceUDFs);
            }
            finally {
                int diff= ((int)(System.nanoTime()-exeTime)-(pc.getExecutionTime()-currTime));
                pc.setExecutionTime(pc.getExecutionTime()+(int)(System.nanoTime()-time));
                debugEntry.updateExeTime(diff);
                pc.removeLastPageSource(true);
            }
        }
    // no debug
        else {
View Full Code Here

            long exeTime=0;
            long time=System.nanoTime();
           
            Page currentPage = PageSourceImpl.loadPage(this, sources);
      if(runOnce && includeOnce.contains(currentPage.getPageSource())) return;
            DebugEntryTemplate debugEntry=debugger.getEntry(this,currentPage.getPageSource());
            try {
                addPageSource(currentPage.getPageSource(),true);
                debugEntry.updateFileLoadTime((System.nanoTime()-time));
                exeTime=System.nanoTime();

                currentPage.call(this);
      }
      catch(Throwable t){
        PageException pe = Caster.toPageException(t);
        if(Abort.isAbort(pe)) {
                    if(Abort.isAbort(pe,Abort.SCOPE_REQUEST))throw pe;
                }
                else {
                  if(fdEnabled){
                    FDSignal.signal(pe, false);
                  }
                  pe.addContext(currentPage.getPageSource(),-187,-187, null);// TODO was soll das 187
                  throw pe;
                }
      }
      finally {
        includeOnce.add(currentPage.getPageSource());
        long diff= ((System.nanoTime()-exeTime)-(executionTime-currTime));
          executionTime+=(System.nanoTime()-time);
        debugEntry.updateExeTime(diff);
        removeLastPageSource(true);
     
    }
  // no debug
    else {
View Full Code Here

TOP

Related Classes of railo.runtime.debug.DebugEntryTemplate

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.