public boolean initial(MethodMetricsProcessor processor, boolean accurateMode, int backupRecordersCount) { this.methodMetricsProcessor = processor; this.accurateMode = accurateMode; backupRecordersCount = getFitBackupRecordersCount(backupRecordersCount); if (!initRecorders(backupRecordersCount)) { return false; } if (!initBackgroundTask(backupRecordersCount)) { return false; } return initOther(); }
@Override protected void onMethodEnter() { if (profiling()) { maintainer.addRecorder(methodTagId, profilingConfig.getProfilingParam(innerClassName + "/" + methodName)); mv.visitMethodInsn(INVOKESTATIC, "java/lang/System", "nanoTime", "()J", false); startTimeIdentifier = newLocal(Type.LONG_TYPE); mv.visitVarInsn(LSTORE, startTimeIdentifier); } }
tmpCurRecorders.setStopTime(lastTimeSliceStartTime + millTimeSlice); curIndex = getNextIdx(curIndex); Logger.debug("RecorderMaintainer.roundRobinProcessor curIndex=" + curIndex % recordersList.size());