From eaae84d7eab9cbe85f0ef3b60d8f378887b367f8 Mon Sep 17 00:00:00 2001 From: Harrison Date: Wed, 9 Mar 2022 16:14:39 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20KERNEL-10354=20bytebuddy=20/=20?= =?UTF-8?q?=E5=8A=A0=E8=A7=A3=E5=AF=86=E6=80=A7=E8=83=BD=E4=BC=98=E5=8C=96?= =?UTF-8?q?=20@Harrison=20Advice=20=E5=86=85=E9=83=A8=E7=9A=84=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E5=BF=85=E9=A1=BB=E6=98=AF=20public=20=E5=90=A6?= =?UTF-8?q?=E5=88=99=E8=AE=BF=E9=97=AE=E4=B8=8D=E5=88=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/record/analyzer/advice/MonitorAdvice.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/record/analyzer/advice/MonitorAdvice.java b/designer-base/src/main/java/com/fr/design/record/analyzer/advice/MonitorAdvice.java index 8b6d0dbcde..464d4cb7c0 100644 --- a/designer-base/src/main/java/com/fr/design/record/analyzer/advice/MonitorAdvice.java +++ b/designer-base/src/main/java/com/fr/design/record/analyzer/advice/MonitorAdvice.java @@ -105,7 +105,7 @@ public class MonitorAdvice implements DesignerAnalyzerAdvice { } } - private static String getErrorContent(Exception e) { + public static String getErrorContent(Exception e) { int errorCode = GeneralUtils.objectToNumber( extractCodeFromString(e.getMessage()) ).intValue(); @@ -113,7 +113,7 @@ public class MonitorAdvice implements DesignerAnalyzerAdvice { return e.getClass().getName() + ":" + (errorCode >= MIN_ERROR_CODE ? errorCode : StringUtils.EMPTY); } - private static String extractCodeFromString(String errorMsg) { + public static String extractCodeFromString(String errorMsg) { Matcher m = P.matcher(errorMsg); if (m.find()) { return m.group(); @@ -121,25 +121,25 @@ public class MonitorAdvice implements DesignerAnalyzerAdvice { return StringUtils.EMPTY; } - private static void recordSQLDetail(String uuid) { + public static void recordSQLDetail(String uuid) { DBMeterFactory.getMeter().submit(uuid); } - private static void recordSQL(Compute once, MeasureObject measureObject) { + public static void recordSQL(Compute once, MeasureObject measureObject) { if (SupervisoryConfig.getInstance().isEnableMeasureSql() && once.computeSql()) { measureObject.sqlTime(SessionLocalManager.getSqlTime()); measureObject.sql(SessionLocalManager.getSql()); } } - private static void recordMemory(Compute once, Measurable measurable, MeasureObject measureObject) { + public static void recordMemory(Compute once, Measurable measurable, MeasureObject measureObject) { if (SupervisoryConfig.getInstance().isEnableMeasureMemory() && once.computeMemory()) { MeasureUnit unit = measurable.measureUnit(); measureObject.memory(unit.measureMemory()); } } - private static boolean findSessionAnnotation(Method method, Object[] args) { + public static boolean findSessionAnnotation(Method method, Object[] args) { Annotation[][] all = method.getParameterAnnotations(); int len = ArrayUtils.getLength(args); for (int i = 0; i < len; i++) {