You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2020/10/11 14:35:04 UTC
[GitHub] [skywalking] wu-sheng commented on a change in pull request #5648: Provide meter agent test tool support
wu-sheng commented on a change in pull request #5648:
URL: https://github.com/apache/skywalking/pull/5648#discussion_r502922838
##########
File path: docs/en/guides/Plugin-test.md
##########
@@ -294,6 +294,48 @@ The verify description for SegmentRef
| networkAddress | The peer value of parent exit span.
| refType | Ref type, options, CrossProcess or CrossThread.
+**Meter verify description format**
+```yml
+meterItems:
+-
+ serviceName: SERVICE_NAME(string)
+ meterSize: SEGMENT_SIZE(int)
Review comment:
```suggestion
meterSize: METER_SIZE(int)
```
##########
File path: docs/en/guides/Plugin-test.md
##########
@@ -294,6 +294,48 @@ The verify description for SegmentRef
| networkAddress | The peer value of parent exit span.
| refType | Ref type, options, CrossProcess or CrossThread.
+**Meter verify description format**
+```yml
+meterItems:
+-
+ serviceName: SERVICE_NAME(string)
+ meterSize: SEGMENT_SIZE(int)
+ meters:
+ - ...
+```
+
+| Field | Description
+| --- | ---
+| serviceName | Service Name.
+| meterSize | The number of meters is expected.
+| meters | meter list. Follow the next section to see how to describe every meter.
+
+**Meter data verify description format**
+
+```yml
+ meterId:
+ name: NAME(string)
+ tags:
+ - {name: TAG_NAME(string), value: TAG_VALUE(string)}
+ singleValue: SINGLE_VALUE(double)
+ histogram:
+ - {bucket: HISTOGRAM_BUCKET(double), count: HISTOGRAM_BUCKET_COUNT(long)}
Review comment:
How could you know the count? the values are generated in the runtime, I have doubt that it is possible to be accurate.
##########
File path: docs/en/guides/Plugin-test.md
##########
@@ -294,6 +294,48 @@ The verify description for SegmentRef
| networkAddress | The peer value of parent exit span.
| refType | Ref type, options, CrossProcess or CrossThread.
+**Meter verify description format**
+```yml
+meterItems:
+-
+ serviceName: SERVICE_NAME(string)
+ meterSize: SEGMENT_SIZE(int)
+ meters:
+ - ...
+```
Review comment:
I think you missed this part of the document for this, https://github.com/apache/skywalking/blob/dba60957d9cf55a5bdf8c50eaeb9be76eeb401b9/docs/en/guides/Plugin-test.md#the-example-process-of-writing-expected-data
##########
File path: test/plugin/scenarios/apm-toolkit-trace-scenario/src/main/java/org/apache/skywalking/apm/toolkit/meter/BaseBuilder.java
##########
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.apm.toolkit.meter;
+
+import java.util.Objects;
+
+/**
+ * Help to build the meter
+ */
+public abstract class BaseBuilder<BUILDER extends BaseBuilder, METER extends BaseMeter> {
Review comment:
Could you use the snapshot for now to replace the duplicated codes?
##########
File path: docs/en/guides/Plugin-test.md
##########
@@ -294,6 +294,48 @@ The verify description for SegmentRef
| networkAddress | The peer value of parent exit span.
| refType | Ref type, options, CrossProcess or CrossThread.
+**Meter verify description format**
+```yml
+meterItems:
+-
+ serviceName: SERVICE_NAME(string)
+ meterSize: SEGMENT_SIZE(int)
Review comment:
What is the size? Do you mean how many names of meter?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org