Tabnine Logo
Recorder
Code IndexAdd Tabnine to your IDE (free)

How to use
Recorder
in
cn.myperf4j.core.recorder

Best Java code snippets using cn.myperf4j.core.recorder.Recorder (Showing top 4 results out of 315)

origin: LinShunKang/MyPerf4J

public void resetRecorder() {
  int count = recorderCount.get();
  for (int i = 0; i < count; ++i) {
    Recorder recorder = recorderArr.get(i);
    if (recorder != null) {
      recorder.resetRecord();
    }
  }
}
origin: LinShunKang/MyPerf4J

public static MethodMetrics calPerfStats(Recorder recorder, MethodTag methodTag, long startTime, long stopTime) {
  int[] sortedRecords = null;
  try {
    int effectiveCount = recorder.getEffectiveCount();
    sortedRecords = ChunkPool.getInstance().getChunk(effectiveCount * 2);
    recorder.fillSortedRecords(sortedRecords);
    return calPerfStats(methodTag, startTime, stopTime, sortedRecords, effectiveCount);
  } catch (Exception e) {
    Logger.error("MethodMetricsCalculator.calPerfStats(" + recorder + ", " + methodTag + ", " + startTime + ", " + stopTime + ")", e);
  } finally {
    ChunkPool.getInstance().returnChunk(sortedRecords);
  }
  return MethodMetrics.getInstance(methodTag, startTime, stopTime);
}
origin: LinShunKang/MyPerf4J

for (int i = 0; i < actualSize; ++i) {
  Recorder recorder = tmpCurRecorders.getRecorder(i);
  if (recorder == null || !recorder.hasRecord()) {
    continue;
  MethodTag methodTag = methodTagMaintainer.getMethodTag(recorder.getMethodTagId());
  MethodMetrics metrics = MethodMetricsCalculator.calPerfStats(recorder, methodTag, tmpCurRecorders.getStartTime(), tmpCurRecorders.getStopTime());
  methodMetricsProcessor.process(metrics, tmpCurRecorders.getStartTime(), tmpCurRecorders.getStartTime(), tmpCurRecorders.getStopTime());
origin: LinShunKang/MyPerf4J

public static void profiling(long startNanos, int methodTagId) {
  try {
    if (!running) {
      Logger.warn("ProfilingAspect.doProfiling(): methodTagId=" + methodTagId + ", methodTag=" + MethodTagMaintainer.getInstance().getMethodTag(methodTagId) + ", startNanos: " + startNanos + ", IGNORED!!!");
      return;
    }
    Recorder recorder = recorderMaintainer.getRecorder(methodTagId);
    if (recorder == null) {
      Logger.warn("ProfilingAspect.doProfiling(): methodTagId=" + methodTagId + ", methodTag=" + MethodTagMaintainer.getInstance().getMethodTag(methodTagId) + ", startNanos: " + startNanos + ", recorder is null IGNORED!!!");
      return;
    }
    long stopNanos = System.nanoTime();
    recorder.recordTime(startNanos, stopNanos);
  } catch (Exception e) {
    Logger.error("ProfilingAspect.doProfiling(" + startNanos + ", " + methodTagId + ", " + MethodTagMaintainer.getInstance().getMethodTag(methodTagId) + ")", e);
  }
}
cn.myperf4j.core.recorderRecorder

Javadoc

Created by LinShunkang on 2018/3/13

Most used methods

  • fillSortedRecords
    为了节省内存的使用,利用int[]作为返回结果
  • getEffectiveCount
    获取有效的记录的个数
  • getMethodTagId
  • hasRecord
  • recordTime
  • resetRecord

Popular in Java

  • Making http post requests using okhttp
  • getSupportFragmentManager (FragmentActivity)
  • getExternalFilesDir (Context)
  • setRequestProperty (URLConnection)
  • Menu (java.awt)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now