You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@skywalking.apache.org by wu...@apache.org on 2018/09/16 15:33:55 UTC

[incubator-skywalking-oal-tool] branch master updated: Fix bugs.

This is an automated email from the ASF dual-hosted git repository.

wusheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-skywalking-oal-tool.git


The following commit(s) were added to refs/heads/master by this push:
     new 0802ae7  Fix bugs.
0802ae7 is described below

commit 0802ae7aea6be48ab4515e7a858f0ec57b99ed69
Author: Wu Sheng <wu...@foxmail.com>
AuthorDate: Sun Sep 16 23:33:48 2018 +0800

    Fix bugs.
---
 .../resources/code-templates/EndpointRelationDispatcherTemplate.ftl   | 4 ++--
 oal-parser/src/main/resources/code-templates/IndicatorImplementor.ftl | 2 +-
 oal-parser/src/test/resources/oal_test.oal                            | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/oal-parser/src/main/resources/code-templates/EndpointRelationDispatcherTemplate.ftl b/oal-parser/src/main/resources/code-templates/EndpointRelationDispatcherTemplate.ftl
index f697ef1..5b68f81 100644
--- a/oal-parser/src/main/resources/code-templates/EndpointRelationDispatcherTemplate.ftl
+++ b/oal-parser/src/main/resources/code-templates/EndpointRelationDispatcherTemplate.ftl
@@ -19,9 +19,9 @@
 package org.apache.skywalking.oap.server.core.analysis.generated.endpointrelation;
 
 import org.apache.skywalking.oap.server.core.analysis.SourceDispatcher;
-<#if (serviceInstanceRelationIndicators?size>0)>
+<#if (endpointRelationIndicators?size>0)>
 import org.apache.skywalking.oap.server.core.analysis.worker.IndicatorProcess;
-    <#list serviceInstanceRelationIndicators as indicator>
+    <#list endpointRelationIndicators as indicator>
         <#if indicator.filterExpressions??>
 import org.apache.skywalking.oap.server.core.analysis.indicator.expression.*;
             <#break>
diff --git a/oal-parser/src/main/resources/code-templates/IndicatorImplementor.ftl b/oal-parser/src/main/resources/code-templates/IndicatorImplementor.ftl
index 6576b3a..0364a74 100644
--- a/oal-parser/src/main/resources/code-templates/IndicatorImplementor.ftl
+++ b/oal-parser/src/main/resources/code-templates/IndicatorImplementor.ftl
@@ -160,7 +160,7 @@ public class ${metricName}Indicator extends ${indicatorClassName} implements Ala
 </#list>
 
 <#list serializeFields.intLongValuePairListFields as field>
-        setDetailGroup(new ArrayList<>(30));
+        setDetailGroup(new IntKeyLongValueArray(30));
         remoteData.getDataIntLongPairListList().forEach(element -> {
             getDetailGroup().add(new IntKeyLongValue(element.getKey(), element.getValue()));
         });
diff --git a/oal-parser/src/test/resources/oal_test.oal b/oal-parser/src/test/resources/oal_test.oal
index 054e962..4c067ed 100644
--- a/oal-parser/src/test/resources/oal_test.oal
+++ b/oal-parser/src/test/resources/oal_test.oal
@@ -61,8 +61,8 @@ endpoint_relation_resp_time = from(EndpointRelation.rpcLatency).filter(detectPoi
 
 // JVM instance metric
 instance_jvm_cpu = from(ServiceInstanceJVMCPU.usePercent).doubleAvg();
-instance_jvm_memory_heap = from(ServiceInstanceJVMMemory.max).filter(isHeap == true).longAvg();
-instance_jvm_memory_noheap = from(ServiceInstanceJVMMemory.max).filter(isHeap == false).longAvg();
+instance_jvm_memory_heap = from(ServiceInstanceJVMMemory.max).filter(heapStatus == true).longAvg();
+instance_jvm_memory_noheap = from(ServiceInstanceJVMMemory.max).filter(heapStatus == false).longAvg();
 instance_jvm_young_gc_time = from(ServiceInstanceJVMGC.time).filter(phrase == GCPhrase.NEW).longAvg();
 instance_jvm_old_gc_time = from(ServiceInstanceJVMGC.time).filter(phrase == GCPhrase.OLD).longAvg();
 instance_jvm_young_gc_count = from(ServiceInstanceJVMGC.count).filter(phrase == GCPhrase.NEW).sum();