Examples of ThreadData


Examples of com.taobao.profile.runtime.ThreadData

   * @return
   */
  private void dumpProfileData() {
    ThreadData[] threadData = Profiler.threadProfile;
    for (int index = 0; index < threadData.length; index++) {
      ThreadData profilerData = threadData[index];
      if (profilerData == null) {
        continue;
      }
      ProfStack<long[]> profile = profilerData.profileData;
      while (profile.size() > 0) {
        long[] data = profile.pop();
        StringBuilder sb = new StringBuilder();
        // thread id
        sb.append(index);
        sb.append('\t');
        // stack number
        sb.append(data[1]);
        sb.append('\t');
        // method id
        sb.append(data[0]);
        sb.append('\t');
        // use time
        sb.append(data[2]);
        sb.append('\n');
        fileWriter.append(sb.toString());
      }
      fileWriter.flushAppend();
      profilerData.clear();
    }
    fileWriter.append("=\n");
    fileWriter.flushAppend();
  }
View Full Code Here

Examples of com.taobao.profile.runtime.ThreadData

      startTime = System.nanoTime();
    } else {
      startTime = System.currentTimeMillis();
    }
    try {
      ThreadData thrData = threadProfile[(int) threadId];
      if (thrData == null) {
        thrData = new ThreadData();
        threadProfile[(int) threadId] = thrData;
      }

      long[] frameData = new long[3];
      frameData[0] = methodId;
View Full Code Here

Examples of com.taobao.profile.runtime.ThreadData

      endTime = System.nanoTime();
    } else {
      endTime = System.currentTimeMillis();
    }
    try {
      ThreadData thrData = threadProfile[(int) threadId];
      if (thrData == null || thrData.stackNum <= 0 || thrData.stackFrame.size() == 0) {
        // 没有执行start,直接执行end/可能是异步停止导致的
        return;
      }
      // 栈太深则抛弃部分数据
View Full Code Here

Examples of com.taobao.profile.runtime.ThreadData

    }
  }

  public static void clearData() {
    for (int index = 0; index < threadProfile.length; index++) {
      ThreadData profilerData = threadProfile[index];
      if (profilerData == null) {
        continue;
      }
      profilerData.clear();
    }
  }
View Full Code Here

Examples of org.apache.geronimo.security.ThreadData

        }
        return null;
    }

    public static SOAPMessage pushContextData(SOAPMessage SOAPMessage) {
        ThreadData threadData = ContextManager.getThreadData();
        SOAPMessage oldMessage = threadData.getSoapMessage();
        threadData.setSoapMessage(SOAPMessage);
        return oldMessage;
    }
View Full Code Here

Examples of org.apache.geronimo.security.ThreadData

        threadData.setSoapMessage(SOAPMessage);
        return oldMessage;
    }

    public static void popContextData(SOAPMessage oldMessage) {
        ThreadData threadData = ContextManager.getThreadData();
        threadData.setSoapMessage(oldMessage);
    }
View Full Code Here

Examples of org.apache.geronimo.security.ThreadData

        }
        return null;
    }

    public static EnterpriseBean pushContextData(EnterpriseBean bean) {
        ThreadData threadData = ContextManager.getThreadData();
        EnterpriseBean oldBean = threadData.getBean();
        threadData.setBean(bean);
        return oldBean;
    }
View Full Code Here

Examples of org.apache.geronimo.security.ThreadData

        threadData.setBean(bean);
        return oldBean;
    }

    public static void popContextData(EnterpriseBean oldBean) {
        ThreadData threadData = ContextManager.getThreadData();
        threadData.setBean(oldBean);
    }
View Full Code Here

Examples of org.apache.geronimo.security.ThreadData

        }
        return null;
    }

    public static HttpServletRequest pushContextData(HttpServletRequest httpServletRequest) {
        ThreadData threadData = ContextManager.getThreadData();
        HttpServletRequest oldRequest = threadData.getRequest();
        threadData.setRequest(httpServletRequest);
        return oldRequest;
    }
View Full Code Here

Examples of org.apache.geronimo.security.ThreadData

        threadData.setRequest(httpServletRequest);
        return oldRequest;
    }

    public static void popContextData(HttpServletRequest oldRequest) {
        ThreadData threadData = ContextManager.getThreadData();
        threadData.setRequest(oldRequest);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.