Codota Logo
Recorder
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
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

  • Parsing JSON documents to java classes using gson
  • getResourceAsStream (ClassLoader)
  • getExternalFilesDir (Context)
  • getContentResolver (Context)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • FileInputStream (java.io)
    A FileInputStream obtains input bytes from a file in a file system. What files are available depends
  • PrintStream (java.io)
    A PrintStream adds functionality to another output stream, namely the ability to print representatio
  • Dictionary (java.util)
    The Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to valu
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now