[jira] [Commented] (SCB-346) Create the distribution kit for Saga
[ https://issues.apache.org/jira/browse/SCB-346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16389155#comment-16389155 ] ASF GitHub Bot commented on SCB-346: coveralls commented on issue #146: [SCB-346] Add saga-persistence back URL: https://github.com/apache/incubator-servicecomb-saga/pull/146#issuecomment-371044896 [![Coverage Status](https://coveralls.io/builds/15846356/badge)](https://coveralls.io/builds/15846356) Coverage remained the same at 95.264% when pulling **06c4cff15e7178f495e41024b3f31d2380e70251 on yangbor:master** into **4638e79fea21fd93cdd1ac8d4936029d1be0574c on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Create the distribution kit for Saga > > > Key: SCB-346 > URL: https://issues.apache.org/jira/browse/SCB-346 > Project: Apache ServiceComb > Issue Type: Task > Components: Saga >Affects Versions: saga-0.1.0 >Reporter: Willem Jiang >Assignee: Yang Bo >Priority: Major > Fix For: saga-0.1.0 > > > We need to create a binary distribution file which has all the jars file and > third party dependencies jars and demos. > Current we need to wrap the pack components into the release kit and keep the > old saga module out of the release kit. > For the Alpha server, we can pack the exec jar into the binary distribution. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-346) Create the distribution kit for Saga
[ https://issues.apache.org/jira/browse/SCB-346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16389145#comment-16389145 ] ASF GitHub Bot commented on SCB-346: eric-lee-ltk commented on issue #146: [SCB-346] Add saga-persistence back URL: https://github.com/apache/incubator-servicecomb-saga/pull/146#issuecomment-371043878 LGTM. This fixes #145 . This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Create the distribution kit for Saga > > > Key: SCB-346 > URL: https://issues.apache.org/jira/browse/SCB-346 > Project: Apache ServiceComb > Issue Type: Task > Components: Saga >Affects Versions: saga-0.1.0 >Reporter: Willem Jiang >Assignee: Yang Bo >Priority: Major > Fix For: saga-0.1.0 > > > We need to create a binary distribution file which has all the jars file and > third party dependencies jars and demos. > Current we need to wrap the pack components into the release kit and keep the > old saga module out of the release kit. > For the Alpha server, we can pack the exec jar into the binary distribution. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-346) Create the distribution kit for Saga
[ https://issues.apache.org/jira/browse/SCB-346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16389139#comment-16389139 ] ASF GitHub Bot commented on SCB-346: yangbor opened a new pull request #146: [SCB-346] Add saga-persistence back URL: https://github.com/apache/incubator-servicecomb-saga/pull/146 The saga-persistence module is needed for connecting to databases. Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/SCB) filed for the change (usually before you start working on it). Trivial changes like typos do not require a JIRA issue. Your pull request should address just this issue, without pulling in other changes. - [ ] Each commit in the pull request should have a meaningful subject line and body. - [ ] Format the pull request title like `[SCB-XXX] Fixes bug in ApproximateQuantiles`, where you replace `SCB-XXX` with the appropriate JIRA issue. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Run `mvn clean install` to make sure basic checks pass. A more thorough check will be performed on your pull request automatically. - [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf). --- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Create the distribution kit for Saga > > > Key: SCB-346 > URL: https://issues.apache.org/jira/browse/SCB-346 > Project: Apache ServiceComb > Issue Type: Task > Components: Saga >Affects Versions: saga-0.1.0 >Reporter: Willem Jiang >Assignee: Yang Bo >Priority: Major > Fix For: saga-0.1.0 > > > We need to create a binary distribution file which has all the jars file and > third party dependencies jars and demos. > Current we need to wrap the pack components into the release kit and keep the > old saga module out of the release kit. > For the Alpha server, we can pack the exec jar into the binary distribution. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-370) Metrics timer (like latency) output precision must to nano level not milli level
[ https://issues.apache.org/jira/browse/SCB-370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16389073#comment-16389073 ] ASF GitHub Bot commented on SCB-370: zhengyangyong commented on a change in pull request #572: [SCB-370] Improve latency and max precision URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/572#discussion_r172748835 ## File path: metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/HighPrecisionBasicTimer.java ## @@ -0,0 +1,101 @@ +/* + * 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.servicecomb.metrics.core; + +import java.util.concurrent.TimeUnit; + +import org.apache.servicecomb.foundation.metrics.MetricsConst; + +import com.netflix.servo.monitor.BasicTimer; +import com.netflix.servo.monitor.Monitor; +import com.netflix.servo.monitor.MonitorConfig; +import com.netflix.servo.tag.Tags; + +//latency and max should return by default millisecond unit value for easy use +//because Timer is extends NumericMonitor so only can return Long result value and lost precision (value after the decimal point will be remove) +//warp BasicTimer, return custom Monitor for calculate double millisecond value +public class HighPrecisionBasicTimer extends BasicTimer { + private final MonitorForTimerValue timerValueMonitor; + + private final MonitorForTimerMax timerMaxMonitor; + + public MonitorForTimerValue getTimerValueMonitor() { +return timerValueMonitor; + } + + public MonitorForTimerMax getTimerMaxMonitor() { +return timerMaxMonitor; + } + + public HighPrecisionBasicTimer(MonitorConfig config) { +super(config, TimeUnit.NANOSECONDS); +this.timerValueMonitor = new MonitorForTimerValue(this); +this.timerMaxMonitor = new MonitorForTimerMax(this); + } + + class MonitorForTimerValue implements Monitor { + +private final BasicTimer timer; + +public MonitorForTimerValue(BasicTimer timer) { + this.timer = timer; +} + +@Override +public Double getValue() { + return this.getValue(0); +} + +@Override +public Double getValue(int pollerIndex) { + //we need direct div for keep value after the decimal point + long nanoValue = timer.getValue(); + return (double) nanoValue / (double) 100; +} + +@Override +public MonitorConfig getConfig() { + return timer.getConfig().withAdditionalTag(Tags.newTag(MetricsConst.TAG_STATISTIC, "latency")); +} + } + + class MonitorForTimerMax implements Monitor { + Review comment: I direct use getValue() implemented in basicTimer: @Override public Long getValue(int pollerIndex) { final long cnt = count.getCurrentCount(pollerIndex); final long value = (long) (getTotal(pollerIndex) / cnt); return (cnt == 0) ? 0L : value; } set it's output unit to nano then div 100 to get milli value This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Metrics timer (like latency) output precision must to nano level not milli > level > > > Key: SCB-370 > URL: https://issues.apache.org/jira/browse/SCB-370 > Project: Apache ServiceComb > Issue Type: Sub-task > Components: Java-Chassis >Affects Versions: java-chassis-1.0.0-m1 >Reporter: yangyongzheng >Assignee: yangyongzheng >Priority: Major > Fix For: java-chassis-1.0.0-m1 > > > current metrics latency default unit is MILLISECONDS and low than 1 > milliseconds like 0.5 will return 0,we need support higher accuracy and keep > value after the decimal point -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-370) Metrics timer (like latency) output precision must to nano level not milli level
[ https://issues.apache.org/jira/browse/SCB-370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16389068#comment-16389068 ] ASF GitHub Bot commented on SCB-370: zhengyangyong commented on a change in pull request #572: [SCB-370] Improve latency and max precision URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/572#discussion_r172748462 ## File path: metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/HighPrecisionBasicTimer.java ## @@ -0,0 +1,101 @@ +/* + * 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.servicecomb.metrics.core; + +import java.util.concurrent.TimeUnit; + +import org.apache.servicecomb.foundation.metrics.MetricsConst; + +import com.netflix.servo.monitor.BasicTimer; +import com.netflix.servo.monitor.Monitor; +import com.netflix.servo.monitor.MonitorConfig; +import com.netflix.servo.tag.Tags; + +//latency and max should return by default millisecond unit value for easy use +//because Timer is extends NumericMonitor so only can return Long result value and lost precision (value after the decimal point will be remove) +//warp BasicTimer, return custom Monitor for calculate double millisecond value +public class HighPrecisionBasicTimer extends BasicTimer { + private final MonitorForTimerValue timerValueMonitor; + + private final MonitorForTimerMax timerMaxMonitor; + + public MonitorForTimerValue getTimerValueMonitor() { +return timerValueMonitor; + } + + public MonitorForTimerMax getTimerMaxMonitor() { +return timerMaxMonitor; + } + + public HighPrecisionBasicTimer(MonitorConfig config) { +super(config, TimeUnit.NANOSECONDS); +this.timerValueMonitor = new MonitorForTimerValue(this); +this.timerMaxMonitor = new MonitorForTimerMax(this); + } + + class MonitorForTimerValue implements Monitor { + +private final BasicTimer timer; + +public MonitorForTimerValue(BasicTimer timer) { + this.timer = timer; +} + +@Override +public Double getValue() { + return this.getValue(0); +} + +@Override +public Double getValue(int pollerIndex) { + //we need direct div for keep value after the decimal point + long nanoValue = timer.getValue(); + return (double) nanoValue / (double) 100; Review comment: public BasicTimer(MonitorConfig config) { this(config, TimeUnit.MILLISECONDS); } BasicTimer(MonitorConfig config, TimeUnit unit, Clock clock) { ... timeUnitNanosFactor = 1.0 / timeUnit.toNanos(1); ... } private double getTotal(int pollerIndex) { return totalTime.getCurrentCount(pollerIndex) * timeUnitNanosFactor; } This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Metrics timer (like latency) output precision must to nano level not milli > level > > > Key: SCB-370 > URL: https://issues.apache.org/jira/browse/SCB-370 > Project: Apache ServiceComb > Issue Type: Sub-task > Components: Java-Chassis >Affects Versions: java-chassis-1.0.0-m1 >Reporter: yangyongzheng >Assignee: yangyongzheng >Priority: Major > Fix For: java-chassis-1.0.0-m1 > > > current metrics latency default unit is MILLISECONDS and low than 1 > milliseconds like 0.5 will return 0,we need support higher accuracy and keep > value after the decimal point -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-210) Use map feature to design microservice yaml file to support control flag of config center
[ https://issues.apache.org/jira/browse/SCB-210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16388927#comment-16388927 ] ASF GitHub Bot commented on SCB-210: WillemJiang closed pull request #569: SCB-210 remove extra useless config item URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/569 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/dynamic-config/config-apollo/src/main/java/org/apache/servicecomb/config/archaius/sources/ApolloConfigurationSourceImpl.java b/dynamic-config/config-apollo/src/main/java/org/apache/servicecomb/config/archaius/sources/ApolloConfigurationSourceImpl.java index 4dc193186..0093c80c2 100644 --- a/dynamic-config/config-apollo/src/main/java/org/apache/servicecomb/config/archaius/sources/ApolloConfigurationSourceImpl.java +++ b/dynamic-config/config-apollo/src/main/java/org/apache/servicecomb/config/archaius/sources/ApolloConfigurationSourceImpl.java @@ -49,11 +49,22 @@ private List listeners = new CopyOnWriteArrayList<>(); + private static final String APOLLO_CONFIG_URL_KEY = "apollo.config.serverUri"; + public ApolloConfigurationSourceImpl() { } private final UpdateHandler updateHandler = new UpdateHandler(); + @Override + public boolean isValidSource(Configuration localConfiguration) { +if (localConfiguration.getProperty(APOLLO_CONFIG_URL_KEY) == null){ + LOGGER.warn("Apollo configuration source is not configured!"); + return false; +} +return true; + } + @Override public void init(Configuration localConfiguration) { ApolloConfig.setConcurrentCompositeConfiguration(localConfiguration); diff --git a/dynamic-config/config-apollo/src/test/resources/microservice.yaml b/dynamic-config/config-apollo/src/test/resources/microservice.yaml index f050218a5..6c8b496fa 100644 --- a/dynamic-config/config-apollo/src/test/resources/microservice.yaml +++ b/dynamic-config/config-apollo/src/test/resources/microservice.yaml @@ -16,7 +16,7 @@ ## limitations under the License. ## --- -APPLICATION_ID: pojotest +APPLICATION_ID: apollotest service_description: name: apollo-test version: 1.0.1 @@ -33,9 +33,6 @@ apollo: firstRefreshInterval: 0 cse: - config: -client: - serverUri: http://127.0.0.1:8070 service: registry: address: http://127.0.0.1:30100 diff --git a/dynamic-config/config-cc/src/main/java/org/apache/servicecomb/config/archaius/sources/ConfigCenterConfigurationSourceImpl.java b/dynamic-config/config-cc/src/main/java/org/apache/servicecomb/config/archaius/sources/ConfigCenterConfigurationSourceImpl.java index 74a7d90a2..d4392994f 100644 --- a/dynamic-config/config-cc/src/main/java/org/apache/servicecomb/config/archaius/sources/ConfigCenterConfigurationSourceImpl.java +++ b/dynamic-config/config-cc/src/main/java/org/apache/servicecomb/config/archaius/sources/ConfigCenterConfigurationSourceImpl.java @@ -49,9 +49,20 @@ private UpdateHandler updateHandler = new UpdateHandler(); + private static final String CONFIG_CENTER_URL_KEY = "cse.config.client.serverUri"; + public ConfigCenterConfigurationSourceImpl() { } + @Override + public boolean isValidSource(Configuration localConfiguration) { +if (localConfiguration.getProperty(CONFIG_CENTER_URL_KEY) == null) { + LOGGER.warn("Config Center configuration source is not configured!"); + return false; +} +return true; + } + private void init() { ConfigCenterClient configCenterClient = new ConfigCenterClient(updateHandler); configCenterClient.connectServer(); diff --git a/foundations/foundation-config/src/main/java/org/apache/servicecomb/config/ConfigUtil.java b/foundations/foundation-config/src/main/java/org/apache/servicecomb/config/ConfigUtil.java index 28e285512..fbef8a9a1 100644 --- a/foundations/foundation-config/src/main/java/org/apache/servicecomb/config/ConfigUtil.java +++ b/foundations/foundation-config/src/main/java/org/apache/servicecomb/config/ConfigUtil.java @@ -50,8 +50,6 @@ public final class ConfigUtil { private static final Logger LOGGER = LoggerFactory.getLogger(ConfigUtil.class); - protected static final String configCenterUrlKey = "cse.config.client.serverUri"; - private static final String MICROSERVICE_CONFIG_LOADER_KEY = "cse-microservice-config-loader"; private ConfigUtil() { @@ -150,11 +148,6 @@ private static void duplicateServiceCombConfigToCse(ConcurrentCompositeConfigura } public static DynamicWatchedConfiguration createConfigFromConfigCenter(Configuration localConfiguration) { -if
[jira] [Commented] (SCB-346) Create the distribution kit for Saga
[ https://issues.apache.org/jira/browse/SCB-346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16388892#comment-16388892 ] ASF GitHub Bot commented on SCB-346: WillemJiang closed pull request #144: SCB-346 Add third party licenses URL: https://github.com/apache/incubator-servicecomb-saga/pull/144 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/omega/omega-transport/omega-transport-servicecomb/pom.xml b/omega/omega-transport/omega-transport-servicecomb/pom.xml index 2798f7d4..5ff6ec2f 100644 --- a/omega/omega-transport/omega-transport-servicecomb/pom.xml +++ b/omega/omega-transport/omega-transport-servicecomb/pom.xml @@ -29,10 +29,12 @@ omega-transport-servicecomb + io.servicecomb java-chassis-core ${java.chassis.version} + provided diff --git a/saga-distribution/src/assembly/bin.xml b/saga-distribution/src/assembly/bin.xml index ede5cf4e..bc564c7a 100644 --- a/saga-distribution/src/assembly/bin.xml +++ b/saga-distribution/src/assembly/bin.xml @@ -52,6 +52,7 @@ NOTICE LICENSE +licenses/** diff --git a/saga-distribution/src/release/LICENSE b/saga-distribution/src/release/LICENSE index 0e4f36a7..f2fad136 100644 --- a/saga-distribution/src/release/LICENSE +++ b/saga-distribution/src/release/LICENSE @@ -201,3 +201,209 @@ limitations under the License. === +Apache ServiceComb Saga Subcomponents: + +The Apache ServiceComb Saga project contains subcomponents with +separate copyright notices and license terms. Your use of the source +for these subcomponents is subject to the terms and conditions of the +following licenses. + + +=== +For org.aspectj:aspectjweaver:jar:1.8.10 +=== +This product bundles AspectJ weaver which is licensed under the +Eclipse Public License v1.0. +For details, see http://www.aspectj.org +You can find a copy of the License at licenses/LICENSE-epl-v10 + +=== +For javax.servlet:javax.servlet-api:jar:3.1.0 +=== +This product bundles Java Servlet API which is licensed under the +COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.1. +For details, see http://servlet-spec.java.net +You can find a copy of the License at licenses/LICENSE-javax + +=== +For javax.interceptor:javax.interceptor-api:jar:1.2 +=== +This product bundles javax.interceptor API which is licensed under the +COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.1. +For details, see http://interceptors-spec.java.net +You can find a copy of the License at licenses/LICENSE-javax + +=== +For javax.transaction:javax.transaction-api:jar:1.2 +=== +This product bundles javax.transaction API which is licensed under the +COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.1. +For details, see http://jta-spec.java.net +You can find a copy of the License at licenses/LICENSE-javax + +=== +For ch.qos.logback:logback-core:jar:1.1.11 +ch.qos.logback:logback-classic:jar:1.1.11 +=== +This product bundles Logback which is licensed under the +Eclipse Public License v1.0. +For details, see http://logback.qos.ch +You can find a copy of the License at licenses/LICENSE-logback + +=== +For org.postgresql:postgresql:bundle:9.4.1212.jre7 +=== +This product bundles postgresql which is licensed under the +PostgreSQL license. +For details, see https://github.com/pgjdbc/pgjdbc-parent-poms +You can find a copy of the License at licenses/LICENSE-postgresql + +=== +For org.glassfish:javax.json:bundle:1.0.4 +=== +This product bundles jsonp API which is licensed under the +COMMON DEVELOPMENT AND DISTRIBUTION
[jira] [Commented] (SCB-210) Use map feature to design microservice yaml file to support control flag of config center
[ https://issues.apache.org/jira/browse/SCB-210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16388896#comment-16388896 ] ASF GitHub Bot commented on SCB-210: lijasonvip commented on a change in pull request #569: SCB-210 remove extra useless config item URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/569#discussion_r172722352 ## File path: dynamic-config/config-apollo/src/main/java/org/apache/servicecomb/config/archaius/sources/ApolloConfigurationSourceImpl.java ## @@ -49,11 +49,21 @@ private List listeners = new CopyOnWriteArrayList<>(); + private static final String APOLLO_CONFIG_URL_KEY = "apollo.config.serverUri"; + public ApolloConfigurationSourceImpl() { } private final UpdateHandler updateHandler = new UpdateHandler(); + @Override + public boolean isValidSource(Configuration localConfiguration) { +if (localConfiguration.getProperty(APOLLO_CONFIG_URL_KEY) == null){ Review comment: Fixed. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Use map feature to design microservice yaml file to support control flag of > config center > - > > Key: SCB-210 > URL: https://issues.apache.org/jira/browse/SCB-210 > Project: Apache ServiceComb > Issue Type: Sub-task > Components: Java-Chassis >Reporter: Bo Li >Assignee: Bo Li >Priority: Major > > check comment of wujimin at: > https://github.com/apache/incubator-servicecomb-java-chassis/pull/489/ -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-210) Use map feature to design microservice yaml file to support control flag of config center
[ https://issues.apache.org/jira/browse/SCB-210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=1632#comment-1632 ] ASF GitHub Bot commented on SCB-210: WillemJiang commented on a change in pull request #569: SCB-210 remove extra useless config item URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/569#discussion_r172721105 ## File path: dynamic-config/config-apollo/src/main/java/org/apache/servicecomb/config/archaius/sources/ApolloConfigurationSourceImpl.java ## @@ -49,11 +49,21 @@ private List listeners = new CopyOnWriteArrayList<>(); + private static final String APOLLO_CONFIG_URL_KEY = "apollo.config.serverUri"; + public ApolloConfigurationSourceImpl() { } private final UpdateHandler updateHandler = new UpdateHandler(); + @Override + public boolean isValidSource(Configuration localConfiguration) { +if (localConfiguration.getProperty(APOLLO_CONFIG_URL_KEY) == null){ Review comment: It's better to write the Log here (to let the user know about which configure is wrong). This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Use map feature to design microservice yaml file to support control flag of > config center > - > > Key: SCB-210 > URL: https://issues.apache.org/jira/browse/SCB-210 > Project: Apache ServiceComb > Issue Type: Sub-task > Components: Java-Chassis >Reporter: Bo Li >Assignee: Bo Li >Priority: Major > > check comment of wujimin at: > https://github.com/apache/incubator-servicecomb-java-chassis/pull/489/ -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-210) Use map feature to design microservice yaml file to support control flag of config center
[ https://issues.apache.org/jira/browse/SCB-210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16388868#comment-16388868 ] ASF GitHub Bot commented on SCB-210: liubao68 commented on a change in pull request #569: SCB-210 remove extra useless config item URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/569#discussion_r172719593 ## File path: foundations/foundation-config/src/main/java/org/apache/servicecomb/config/spi/ConfigCenterConfigurationSource.java ## @@ -22,5 +22,6 @@ import com.netflix.config.WatchedConfigurationSource; public interface ConfigCenterConfigurationSource extends WatchedConfigurationSource { + boolean isValidSource(Configuration localConfiguration); Review comment: For compatibility, this method should give default implementation. But it's fine now , this is not known implementations. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Use map feature to design microservice yaml file to support control flag of > config center > - > > Key: SCB-210 > URL: https://issues.apache.org/jira/browse/SCB-210 > Project: Apache ServiceComb > Issue Type: Sub-task > Components: Java-Chassis >Reporter: Bo Li >Assignee: Bo Li >Priority: Major > > check comment of wujimin at: > https://github.com/apache/incubator-servicecomb-java-chassis/pull/489/ -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-210) Use map feature to design microservice yaml file to support control flag of config center
[ https://issues.apache.org/jira/browse/SCB-210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16388867#comment-16388867 ] ASF GitHub Bot commented on SCB-210: liubao68 commented on a change in pull request #569: SCB-210 remove extra useless config item URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/569#discussion_r172183864 ## File path: foundations/foundation-config/src/main/java/org/apache/servicecomb/config/ConfigUtil.java ## @@ -150,7 +151,7 @@ private static void duplicateServiceCombConfigToCse(ConcurrentCompositeConfigura } public static DynamicWatchedConfiguration createConfigFromConfigCenter(Configuration localConfiguration) { -if (localConfiguration.getProperty(configCenterUrlKey) == null) { +if ((localConfiguration.getProperty(configCenterUrlKey) == null) && (localConfiguration.getProperties((configApolloUrlKey)) == null )) { Review comment: This code should be implementation independent. Can you find a better solution if possible? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Use map feature to design microservice yaml file to support control flag of > config center > - > > Key: SCB-210 > URL: https://issues.apache.org/jira/browse/SCB-210 > Project: Apache ServiceComb > Issue Type: Sub-task > Components: Java-Chassis >Reporter: Bo Li >Assignee: Bo Li >Priority: Major > > check comment of wujimin at: > https://github.com/apache/incubator-servicecomb-java-chassis/pull/489/ -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-370) Metrics timer (like latency) output precision must to nano level not milli level
[ https://issues.apache.org/jira/browse/SCB-370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16388832#comment-16388832 ] ASF GitHub Bot commented on SCB-370: wujimin commented on a change in pull request #572: [SCB-370] Improve latency and max precision URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/572#discussion_r172713154 ## File path: metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/HighPrecisionBasicTimer.java ## @@ -0,0 +1,101 @@ +/* + * 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.servicecomb.metrics.core; + +import java.util.concurrent.TimeUnit; + +import org.apache.servicecomb.foundation.metrics.MetricsConst; + +import com.netflix.servo.monitor.BasicTimer; +import com.netflix.servo.monitor.Monitor; +import com.netflix.servo.monitor.MonitorConfig; +import com.netflix.servo.tag.Tags; + +//latency and max should return by default millisecond unit value for easy use +//because Timer is extends NumericMonitor so only can return Long result value and lost precision (value after the decimal point will be remove) +//warp BasicTimer, return custom Monitor for calculate double millisecond value +public class HighPrecisionBasicTimer extends BasicTimer { + private final MonitorForTimerValue timerValueMonitor; + + private final MonitorForTimerMax timerMaxMonitor; + + public MonitorForTimerValue getTimerValueMonitor() { +return timerValueMonitor; + } + + public MonitorForTimerMax getTimerMaxMonitor() { +return timerMaxMonitor; + } + + public HighPrecisionBasicTimer(MonitorConfig config) { +super(config, TimeUnit.NANOSECONDS); +this.timerValueMonitor = new MonitorForTimerValue(this); +this.timerMaxMonitor = new MonitorForTimerMax(this); + } + + class MonitorForTimerValue implements Monitor { + +private final BasicTimer timer; + +public MonitorForTimerValue(BasicTimer timer) { + this.timer = timer; +} + +@Override +public Double getValue() { + return this.getValue(0); +} + +@Override +public Double getValue(int pollerIndex) { + //we need direct div for keep value after the decimal point + long nanoValue = timer.getValue(); + return (double) nanoValue / (double) 100; +} + +@Override +public MonitorConfig getConfig() { + return timer.getConfig().withAdditionalTag(Tags.newTag(MetricsConst.TAG_STATISTIC, "latency")); +} + } + + class MonitorForTimerMax implements Monitor { + Review comment: basicTimer provide monitors, include: totalTimeFactor, count, min, max totalTimeFactoris FactorMonitor wrapped totalTime totalTime is StepCounter FactorMonitor .getValue delegate to StepCounter.getValue so output is second did i missed something? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Metrics timer (like latency) output precision must to nano level not milli > level > > > Key: SCB-370 > URL: https://issues.apache.org/jira/browse/SCB-370 > Project: Apache ServiceComb > Issue Type: Sub-task > Components: Java-Chassis >Affects Versions: java-chassis-1.0.0-m1 >Reporter: yangyongzheng >Assignee: yangyongzheng >Priority: Major > Fix For: java-chassis-1.0.0-m1 > > > current metrics latency default unit is MILLISECONDS and low than 1 > milliseconds like 0.5 will return 0,we need support higher accuracy and keep > value after the decimal point -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-370) Metrics timer (like latency) output precision must to nano level not milli level
[ https://issues.apache.org/jira/browse/SCB-370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16388831#comment-16388831 ] ASF GitHub Bot commented on SCB-370: wujimin commented on a change in pull request #572: [SCB-370] Improve latency and max precision URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/572#discussion_r172712666 ## File path: metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/HighPrecisionBasicTimer.java ## @@ -0,0 +1,101 @@ +/* + * 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.servicecomb.metrics.core; + +import java.util.concurrent.TimeUnit; + +import org.apache.servicecomb.foundation.metrics.MetricsConst; + +import com.netflix.servo.monitor.BasicTimer; +import com.netflix.servo.monitor.Monitor; +import com.netflix.servo.monitor.MonitorConfig; +import com.netflix.servo.tag.Tags; + +//latency and max should return by default millisecond unit value for easy use +//because Timer is extends NumericMonitor so only can return Long result value and lost precision (value after the decimal point will be remove) +//warp BasicTimer, return custom Monitor for calculate double millisecond value +public class HighPrecisionBasicTimer extends BasicTimer { + private final MonitorForTimerValue timerValueMonitor; + + private final MonitorForTimerMax timerMaxMonitor; + + public MonitorForTimerValue getTimerValueMonitor() { +return timerValueMonitor; + } + + public MonitorForTimerMax getTimerMaxMonitor() { +return timerMaxMonitor; + } + + public HighPrecisionBasicTimer(MonitorConfig config) { +super(config, TimeUnit.NANOSECONDS); +this.timerValueMonitor = new MonitorForTimerValue(this); +this.timerMaxMonitor = new MonitorForTimerMax(this); + } + + class MonitorForTimerValue implements Monitor { + +private final BasicTimer timer; + +public MonitorForTimerValue(BasicTimer timer) { + this.timer = timer; +} + +@Override +public Double getValue() { + return this.getValue(0); +} + +@Override +public Double getValue(int pollerIndex) { + //we need direct div for keep value after the decimal point + long nanoValue = timer.getValue(); + return (double) nanoValue / (double) 100; Review comment: it seems that you confused input unit and output unit This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Metrics timer (like latency) output precision must to nano level not milli > level > > > Key: SCB-370 > URL: https://issues.apache.org/jira/browse/SCB-370 > Project: Apache ServiceComb > Issue Type: Sub-task > Components: Java-Chassis >Affects Versions: java-chassis-1.0.0-m1 >Reporter: yangyongzheng >Assignee: yangyongzheng >Priority: Major > Fix For: java-chassis-1.0.0-m1 > > > current metrics latency default unit is MILLISECONDS and low than 1 > milliseconds like 0.5 will return 0,we need support higher accuracy and keep > value after the decimal point -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-370) Metrics timer (like latency) output precision must to nano level not milli level
[ https://issues.apache.org/jira/browse/SCB-370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16388804#comment-16388804 ] ASF GitHub Bot commented on SCB-370: wujimin commented on a change in pull request #572: [SCB-370] Improve latency and max precision URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/572#discussion_r172711717 ## File path: metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/HighPrecisionBasicTimer.java ## @@ -0,0 +1,101 @@ +/* + * 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.servicecomb.metrics.core; + +import java.util.concurrent.TimeUnit; + +import org.apache.servicecomb.foundation.metrics.MetricsConst; + +import com.netflix.servo.monitor.BasicTimer; +import com.netflix.servo.monitor.Monitor; +import com.netflix.servo.monitor.MonitorConfig; +import com.netflix.servo.tag.Tags; + +//latency and max should return by default millisecond unit value for easy use +//because Timer is extends NumericMonitor so only can return Long result value and lost precision (value after the decimal point will be remove) +//warp BasicTimer, return custom Monitor for calculate double millisecond value +public class HighPrecisionBasicTimer extends BasicTimer { + private final MonitorForTimerValue timerValueMonitor; + + private final MonitorForTimerMax timerMaxMonitor; + + public MonitorForTimerValue getTimerValueMonitor() { +return timerValueMonitor; + } + + public MonitorForTimerMax getTimerMaxMonitor() { +return timerMaxMonitor; + } + + public HighPrecisionBasicTimer(MonitorConfig config) { +super(config, TimeUnit.NANOSECONDS); +this.timerValueMonitor = new MonitorForTimerValue(this); +this.timerMaxMonitor = new MonitorForTimerMax(this); + } + + class MonitorForTimerValue implements Monitor { + +private final BasicTimer timer; + +public MonitorForTimerValue(BasicTimer timer) { + this.timer = timer; +} + +@Override +public Double getValue() { + return this.getValue(0); +} + +@Override +public Double getValue(int pollerIndex) { + //we need direct div for keep value after the decimal point + long nanoValue = timer.getValue(); + return (double) nanoValue / (double) 100; Review comment: where is the code, what i see is second. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Metrics timer (like latency) output precision must to nano level not milli > level > > > Key: SCB-370 > URL: https://issues.apache.org/jira/browse/SCB-370 > Project: Apache ServiceComb > Issue Type: Sub-task > Components: Java-Chassis >Affects Versions: java-chassis-1.0.0-m1 >Reporter: yangyongzheng >Assignee: yangyongzheng >Priority: Major > Fix For: java-chassis-1.0.0-m1 > > > current metrics latency default unit is MILLISECONDS and low than 1 > milliseconds like 0.5 will return 0,we need support higher accuracy and keep > value after the decimal point -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-224) [pack] retry sub-transaction on failure
[ https://issues.apache.org/jira/browse/SCB-224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16388789#comment-16388789 ] ASF GitHub Bot commented on SCB-224: coveralls commented on issue #138: [WIP] SCB-224 retry sub-transaction on failure URL: https://github.com/apache/incubator-servicecomb-saga/pull/138#issuecomment-368816986 [![Coverage Status](https://coveralls.io/builds/15827187/badge)](https://coveralls.io/builds/15827187) Coverage increased (+0.4%) to 95.699% when pulling **93b8ccbaec48ce2d91dcb0d740b62d3c9504242d on eric-lee-ltk:SCB-224** into **86cee600dd8560b2ac6b17424c130d1f5abb5739 on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > [pack] retry sub-transaction on failure > --- > > Key: SCB-224 > URL: https://issues.apache.org/jira/browse/SCB-224 > Project: Apache ServiceComb > Issue Type: New Feature > Components: Saga >Reporter: Yin Xiang >Assignee: Eric Lee >Priority: Major > Fix For: saga-0.2.0 > > > as a user, i want to retry transaction in my service, so that it can always > be done eventually. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-346) Create the distribution kit for Saga
[ https://issues.apache.org/jira/browse/SCB-346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16388695#comment-16388695 ] ASF GitHub Bot commented on SCB-346: coveralls commented on issue #144: SCB-346 Add third party licenses URL: https://github.com/apache/incubator-servicecomb-saga/pull/144#issuecomment-370650512 [![Coverage Status](https://coveralls.io/builds/15824950/badge)](https://coveralls.io/builds/15824950) Coverage remained the same at 95.264% when pulling **494c1795399d2c7b2b740ee207ddc21ebb0a17c3 on yangbor:master** into **86cee600dd8560b2ac6b17424c130d1f5abb5739 on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Create the distribution kit for Saga > > > Key: SCB-346 > URL: https://issues.apache.org/jira/browse/SCB-346 > Project: Apache ServiceComb > Issue Type: Task > Components: Saga >Affects Versions: saga-0.1.0 >Reporter: Willem Jiang >Assignee: Yang Bo >Priority: Major > Fix For: saga-0.1.0 > > > We need to create a binary distribution file which has all the jars file and > third party dependencies jars and demos. > Current we need to wrap the pack components into the release kit and keep the > old saga module out of the release kit. > For the Alpha server, we can pack the exec jar into the binary distribution. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-352) Support operation level flow control on provider side
[ https://issues.apache.org/jira/browse/SCB-352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16387919#comment-16387919 ] ASF GitHub Bot commented on SCB-352: yhs0092 commented on issue #568: [SCB-352] Support provider operation level flow control URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/568#issuecomment-370813848 i am refactoring this issue, please do not review this pull request now. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Support operation level flow control on provider side > - > > Key: SCB-352 > URL: https://issues.apache.org/jira/browse/SCB-352 > Project: Apache ServiceComb > Issue Type: Task >Reporter: YaoHaishi >Assignee: YaoHaishi >Priority: Major > Attachments: compile_warning.PNG > > > At present our provider qps flow control only support microservice level. > We need to support schema/operation level qps flow control like consumer side. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-368) ServiceComb supports openssl engine for ssl communication
[ https://issues.apache.org/jira/browse/SCB-368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16387898#comment-16387898 ] ASF GitHub Bot commented on SCB-368: acsukesh opened a new pull request #573: [SCB-368] supports openssl engine for ssl communication URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/573 Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/SCB) filed for the change (usually before you start working on it). Trivial changes like typos do not require a JIRA issue. Your pull request should address just this issue, without pulling in other changes. - [ ] Each commit in the pull request should have a meaningful subject line and body. - [ ] Format the pull request title like `[SCB-XXX] Fixes bug in ApproximateQuantiles`, where you replace `SCB-XXX` with the appropriate JIRA issue. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Run `mvn clean install` to make sure basic checks pass. A more thorough check will be performed on your pull request automatically. - [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf). --- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > ServiceComb supports openssl engine for ssl communication > - > > Key: SCB-368 > URL: https://issues.apache.org/jira/browse/SCB-368 > Project: Apache ServiceComb > Issue Type: New Feature > Components: Java-Chassis >Reporter: sukesh >Assignee: sukesh >Priority: Major > Fix For: java-chassis-1.0.0-m2 > > > netty-tcnative provides openssl support for ssl communication which is easy > to integrate and offers better performance. ServiceComb should support new > configuration(microservice.yaml) item to select the ssl engine as below > ssl.engine: openssl > Default value : jdk -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-370) Metrics timer (like latency) output precision must to nano level not milli level
[ https://issues.apache.org/jira/browse/SCB-370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16387592#comment-16387592 ] ASF GitHub Bot commented on SCB-370: zhengyangyong commented on a change in pull request #572: [SCB-370] Improve latency and max precision URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/572#discussion_r172475324 ## File path: metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/HighPrecisionBasicTimer.java ## @@ -0,0 +1,101 @@ +/* + * 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.servicecomb.metrics.core; + +import java.util.concurrent.TimeUnit; + +import org.apache.servicecomb.foundation.metrics.MetricsConst; + +import com.netflix.servo.monitor.BasicTimer; +import com.netflix.servo.monitor.Monitor; +import com.netflix.servo.monitor.MonitorConfig; +import com.netflix.servo.tag.Tags; + +//latency and max should return by default millisecond unit value for easy use +//because Timer is extends NumericMonitor so only can return Long result value and lost precision (value after the decimal point will be remove) +//warp BasicTimer, return custom Monitor for calculate double millisecond value +public class HighPrecisionBasicTimer extends BasicTimer { + private final MonitorForTimerValue timerValueMonitor; + + private final MonitorForTimerMax timerMaxMonitor; + + public MonitorForTimerValue getTimerValueMonitor() { +return timerValueMonitor; + } + + public MonitorForTimerMax getTimerMaxMonitor() { +return timerMaxMonitor; + } + + public HighPrecisionBasicTimer(MonitorConfig config) { +super(config, TimeUnit.NANOSECONDS); +this.timerValueMonitor = new MonitorForTimerValue(this); +this.timerMaxMonitor = new MonitorForTimerMax(this); + } + + class MonitorForTimerValue implements Monitor { + +private final BasicTimer timer; + +public MonitorForTimerValue(BasicTimer timer) { + this.timer = timer; +} + +@Override +public Double getValue() { + return this.getValue(0); +} + +@Override +public Double getValue(int pollerIndex) { + //we need direct div for keep value after the decimal point + long nanoValue = timer.getValue(); + return (double) nanoValue / (double) 100; +} + +@Override +public MonitorConfig getConfig() { + return timer.getConfig().withAdditionalTag(Tags.newTag(MetricsConst.TAG_STATISTIC, "latency")); +} + } + + class MonitorForTimerMax implements Monitor { + Review comment: MonitorRegistry holds all registered Monitors (timer,counter,gauge etc...) , getRegistedMonitors() return base MonitorT interface collection; BaiscTimer extends MonitorLong, getValue() will return Long type value,so only one logic is div 100 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Metrics timer (like latency) output precision must to nano level not milli > level > > > Key: SCB-370 > URL: https://issues.apache.org/jira/browse/SCB-370 > Project: Apache ServiceComb > Issue Type: Sub-task > Components: Java-Chassis >Affects Versions: java-chassis-1.0.0-m1 >Reporter: yangyongzheng >Assignee: yangyongzheng >Priority: Major > Fix For: java-chassis-1.0.0-m1 > > > current metrics latency default unit is MILLISECONDS and low than 1 > milliseconds like 0.5 will return 0,we need support higher accuracy and keep > value after the decimal point -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-370) Metrics timer (like latency) output precision must to nano level not milli level
[ https://issues.apache.org/jira/browse/SCB-370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16387589#comment-16387589 ] ASF GitHub Bot commented on SCB-370: zhengyangyong commented on a change in pull request #572: [SCB-370] Improve latency and max precision URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/572#discussion_r172475324 ## File path: metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/HighPrecisionBasicTimer.java ## @@ -0,0 +1,101 @@ +/* + * 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.servicecomb.metrics.core; + +import java.util.concurrent.TimeUnit; + +import org.apache.servicecomb.foundation.metrics.MetricsConst; + +import com.netflix.servo.monitor.BasicTimer; +import com.netflix.servo.monitor.Monitor; +import com.netflix.servo.monitor.MonitorConfig; +import com.netflix.servo.tag.Tags; + +//latency and max should return by default millisecond unit value for easy use +//because Timer is extends NumericMonitor so only can return Long result value and lost precision (value after the decimal point will be remove) +//warp BasicTimer, return custom Monitor for calculate double millisecond value +public class HighPrecisionBasicTimer extends BasicTimer { + private final MonitorForTimerValue timerValueMonitor; + + private final MonitorForTimerMax timerMaxMonitor; + + public MonitorForTimerValue getTimerValueMonitor() { +return timerValueMonitor; + } + + public MonitorForTimerMax getTimerMaxMonitor() { +return timerMaxMonitor; + } + + public HighPrecisionBasicTimer(MonitorConfig config) { +super(config, TimeUnit.NANOSECONDS); +this.timerValueMonitor = new MonitorForTimerValue(this); +this.timerMaxMonitor = new MonitorForTimerMax(this); + } + + class MonitorForTimerValue implements Monitor { + +private final BasicTimer timer; + +public MonitorForTimerValue(BasicTimer timer) { + this.timer = timer; +} + +@Override +public Double getValue() { + return this.getValue(0); +} + +@Override +public Double getValue(int pollerIndex) { + //we need direct div for keep value after the decimal point + long nanoValue = timer.getValue(); + return (double) nanoValue / (double) 100; +} + +@Override +public MonitorConfig getConfig() { + return timer.getConfig().withAdditionalTag(Tags.newTag(MetricsConst.TAG_STATISTIC, "latency")); +} + } + + class MonitorForTimerMax implements Monitor { + Review comment: MonitorRegistry holds all registered Monitors (timer,counter,gauge etc...) , getRegistedMonitors() return base Monitor interface collection; BaiscTimer extends Monitor, getValue() will return Long type value,so only one logic is div 100 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Metrics timer (like latency) output precision must to nano level not milli > level > > > Key: SCB-370 > URL: https://issues.apache.org/jira/browse/SCB-370 > Project: Apache ServiceComb > Issue Type: Sub-task > Components: Java-Chassis >Affects Versions: java-chassis-1.0.0-m1 >Reporter: yangyongzheng >Assignee: yangyongzheng >Priority: Major > Fix For: java-chassis-1.0.0-m1 > > > current metrics latency default unit is MILLISECONDS and low than 1 > milliseconds like 0.5 will return 0,we need support higher accuracy and keep > value after the decimal point -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-370) Metrics timer (like latency) output precision must to nano level not milli level
[ https://issues.apache.org/jira/browse/SCB-370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16387579#comment-16387579 ] ASF GitHub Bot commented on SCB-370: zhengyangyong commented on a change in pull request #572: [SCB-370] Improve latency and max precision URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/572#discussion_r172472623 ## File path: metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/HighPrecisionBasicTimer.java ## @@ -0,0 +1,101 @@ +/* + * 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.servicecomb.metrics.core; + +import java.util.concurrent.TimeUnit; + +import org.apache.servicecomb.foundation.metrics.MetricsConst; + +import com.netflix.servo.monitor.BasicTimer; +import com.netflix.servo.monitor.Monitor; +import com.netflix.servo.monitor.MonitorConfig; +import com.netflix.servo.tag.Tags; + +//latency and max should return by default millisecond unit value for easy use +//because Timer is extends NumericMonitor so only can return Long result value and lost precision (value after the decimal point will be remove) +//warp BasicTimer, return custom Monitor for calculate double millisecond value +public class HighPrecisionBasicTimer extends BasicTimer { + private final MonitorForTimerValue timerValueMonitor; + + private final MonitorForTimerMax timerMaxMonitor; + + public MonitorForTimerValue getTimerValueMonitor() { +return timerValueMonitor; + } + + public MonitorForTimerMax getTimerMaxMonitor() { +return timerMaxMonitor; + } + + public HighPrecisionBasicTimer(MonitorConfig config) { +super(config, TimeUnit.NANOSECONDS); +this.timerValueMonitor = new MonitorForTimerValue(this); +this.timerMaxMonitor = new MonitorForTimerMax(this); + } + + class MonitorForTimerValue implements Monitor { + +private final BasicTimer timer; + +public MonitorForTimerValue(BasicTimer timer) { + this.timer = timer; +} + +@Override +public Double getValue() { + return this.getValue(0); +} + +@Override +public Double getValue(int pollerIndex) { + //we need direct div for keep value after the decimal point + long nanoValue = timer.getValue(); + return (double) nanoValue / (double) 100; +} + +@Override +public MonitorConfig getConfig() { + return timer.getConfig().withAdditionalTag(Tags.newTag(MetricsConst.TAG_STATISTIC, "latency")); +} + } + + class MonitorForTimerMax implements Monitor { + Review comment: I will not direct call getTotal() in basicTimer,this method is private for BasicTimer Metrics output will get all register Monitors from MonitorRegistry and call it's getValue() more detail can see MonitorManager.measure() This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Metrics timer (like latency) output precision must to nano level not milli > level > > > Key: SCB-370 > URL: https://issues.apache.org/jira/browse/SCB-370 > Project: Apache ServiceComb > Issue Type: Sub-task > Components: Java-Chassis >Affects Versions: java-chassis-1.0.0-m1 >Reporter: yangyongzheng >Assignee: yangyongzheng >Priority: Major > Fix For: java-chassis-1.0.0-m1 > > > current metrics latency default unit is MILLISECONDS and low than 1 > milliseconds like 0.5 will return 0,we need support higher accuracy and keep > value after the decimal point -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-370) Metrics timer (like latency) output precision must to nano level not milli level
[ https://issues.apache.org/jira/browse/SCB-370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16387573#comment-16387573 ] ASF GitHub Bot commented on SCB-370: zhengyangyong commented on a change in pull request #572: [SCB-370] Improve latency and max precision URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/572#discussion_r172471126 ## File path: metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/HighPrecisionBasicTimer.java ## @@ -0,0 +1,101 @@ +/* + * 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.servicecomb.metrics.core; + +import java.util.concurrent.TimeUnit; + +import org.apache.servicecomb.foundation.metrics.MetricsConst; + +import com.netflix.servo.monitor.BasicTimer; +import com.netflix.servo.monitor.Monitor; +import com.netflix.servo.monitor.MonitorConfig; +import com.netflix.servo.tag.Tags; + +//latency and max should return by default millisecond unit value for easy use +//because Timer is extends NumericMonitor so only can return Long result value and lost precision (value after the decimal point will be remove) +//warp BasicTimer, return custom Monitor for calculate double millisecond value +public class HighPrecisionBasicTimer extends BasicTimer { + private final MonitorForTimerValue timerValueMonitor; + + private final MonitorForTimerMax timerMaxMonitor; + + public MonitorForTimerValue getTimerValueMonitor() { +return timerValueMonitor; + } + + public MonitorForTimerMax getTimerMaxMonitor() { +return timerMaxMonitor; + } + + public HighPrecisionBasicTimer(MonitorConfig config) { +super(config, TimeUnit.NANOSECONDS); +this.timerValueMonitor = new MonitorForTimerValue(this); +this.timerMaxMonitor = new MonitorForTimerMax(this); + } + + class MonitorForTimerValue implements Monitor { + +private final BasicTimer timer; + +public MonitorForTimerValue(BasicTimer timer) { + this.timer = timer; +} + +@Override +public Double getValue() { + return this.getValue(0); +} + +@Override +public Double getValue(int pollerIndex) { + //we need direct div for keep value after the decimal point + long nanoValue = timer.getValue(); + return (double) nanoValue / (double) 100; Review comment: servo default output is ms This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Metrics timer (like latency) output precision must to nano level not milli > level > > > Key: SCB-370 > URL: https://issues.apache.org/jira/browse/SCB-370 > Project: Apache ServiceComb > Issue Type: Sub-task > Components: Java-Chassis >Affects Versions: java-chassis-1.0.0-m1 >Reporter: yangyongzheng >Assignee: yangyongzheng >Priority: Major > Fix For: java-chassis-1.0.0-m1 > > > current metrics latency default unit is MILLISECONDS and low than 1 > milliseconds like 0.5 will return 0,we need support higher accuracy and keep > value after the decimal point -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-370) Metrics timer (like latency) output precision must to nano level not milli level
[ https://issues.apache.org/jira/browse/SCB-370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16387572#comment-16387572 ] ASF GitHub Bot commented on SCB-370: zhengyangyong commented on a change in pull request #572: [SCB-370] Improve latency and max precision URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/572#discussion_r172471126 ## File path: metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/HighPrecisionBasicTimer.java ## @@ -0,0 +1,101 @@ +/* + * 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.servicecomb.metrics.core; + +import java.util.concurrent.TimeUnit; + +import org.apache.servicecomb.foundation.metrics.MetricsConst; + +import com.netflix.servo.monitor.BasicTimer; +import com.netflix.servo.monitor.Monitor; +import com.netflix.servo.monitor.MonitorConfig; +import com.netflix.servo.tag.Tags; + +//latency and max should return by default millisecond unit value for easy use +//because Timer is extends NumericMonitor so only can return Long result value and lost precision (value after the decimal point will be remove) +//warp BasicTimer, return custom Monitor for calculate double millisecond value +public class HighPrecisionBasicTimer extends BasicTimer { + private final MonitorForTimerValue timerValueMonitor; + + private final MonitorForTimerMax timerMaxMonitor; + + public MonitorForTimerValue getTimerValueMonitor() { +return timerValueMonitor; + } + + public MonitorForTimerMax getTimerMaxMonitor() { +return timerMaxMonitor; + } + + public HighPrecisionBasicTimer(MonitorConfig config) { +super(config, TimeUnit.NANOSECONDS); +this.timerValueMonitor = new MonitorForTimerValue(this); +this.timerMaxMonitor = new MonitorForTimerMax(this); + } + + class MonitorForTimerValue implements Monitor { + +private final BasicTimer timer; + +public MonitorForTimerValue(BasicTimer timer) { + this.timer = timer; +} + +@Override +public Double getValue() { + return this.getValue(0); +} + +@Override +public Double getValue(int pollerIndex) { + //we need direct div for keep value after the decimal point + long nanoValue = timer.getValue(); + return (double) nanoValue / (double) 100; Review comment: servo default ouput is ms This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Metrics timer (like latency) output precision must to nano level not milli > level > > > Key: SCB-370 > URL: https://issues.apache.org/jira/browse/SCB-370 > Project: Apache ServiceComb > Issue Type: Sub-task > Components: Java-Chassis >Affects Versions: java-chassis-1.0.0-m1 >Reporter: yangyongzheng >Assignee: yangyongzheng >Priority: Major > Fix For: java-chassis-1.0.0-m1 > > > current metrics latency default unit is MILLISECONDS and low than 1 > milliseconds like 0.5 will return 0,we need support higher accuracy and keep > value after the decimal point -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-370) Metrics timer (like latency) output precision must to nano level not milli level
[ https://issues.apache.org/jira/browse/SCB-370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16387562#comment-16387562 ] ASF GitHub Bot commented on SCB-370: wujimin commented on a change in pull request #572: [SCB-370] Improve latency and max precision URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/572#discussion_r172466850 ## File path: metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/HighPrecisionBasicTimer.java ## @@ -0,0 +1,101 @@ +/* + * 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.servicecomb.metrics.core; + +import java.util.concurrent.TimeUnit; + +import org.apache.servicecomb.foundation.metrics.MetricsConst; + +import com.netflix.servo.monitor.BasicTimer; +import com.netflix.servo.monitor.Monitor; +import com.netflix.servo.monitor.MonitorConfig; +import com.netflix.servo.tag.Tags; + +//latency and max should return by default millisecond unit value for easy use +//because Timer is extends NumericMonitor so only can return Long result value and lost precision (value after the decimal point will be remove) +//warp BasicTimer, return custom Monitor for calculate double millisecond value +public class HighPrecisionBasicTimer extends BasicTimer { + private final MonitorForTimerValue timerValueMonitor; + + private final MonitorForTimerMax timerMaxMonitor; + + public MonitorForTimerValue getTimerValueMonitor() { +return timerValueMonitor; + } + + public MonitorForTimerMax getTimerMaxMonitor() { +return timerMaxMonitor; + } + + public HighPrecisionBasicTimer(MonitorConfig config) { +super(config, TimeUnit.NANOSECONDS); +this.timerValueMonitor = new MonitorForTimerValue(this); +this.timerMaxMonitor = new MonitorForTimerMax(this); + } + + class MonitorForTimerValue implements Monitor { + +private final BasicTimer timer; + +public MonitorForTimerValue(BasicTimer timer) { + this.timer = timer; +} + +@Override +public Double getValue() { + return this.getValue(0); +} + +@Override +public Double getValue(int pollerIndex) { + //we need direct div for keep value after the decimal point + long nanoValue = timer.getValue(); + return (double) nanoValue / (double) 100; +} + +@Override +public MonitorConfig getConfig() { + return timer.getConfig().withAdditionalTag(Tags.newTag(MetricsConst.TAG_STATISTIC, "latency")); +} + } + + class MonitorForTimerMax implements Monitor { + Review comment: max and total time already in basicTimer, why we need so many logic …… This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Metrics timer (like latency) output precision must to nano level not milli > level > > > Key: SCB-370 > URL: https://issues.apache.org/jira/browse/SCB-370 > Project: Apache ServiceComb > Issue Type: Sub-task > Components: Java-Chassis >Affects Versions: java-chassis-1.0.0-m1 >Reporter: yangyongzheng >Assignee: yangyongzheng >Priority: Major > Fix For: java-chassis-1.0.0-m1 > > > current metrics latency default unit is MILLISECONDS and low than 1 > milliseconds like 0.5 will return 0,we need support higher accuracy and keep > value after the decimal point -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (SCB-371) support multiple config sources
Bo Li created SCB-371: - Summary: support multiple config sources Key: SCB-371 URL: https://issues.apache.org/jira/browse/SCB-371 Project: Apache ServiceComb Issue Type: Sub-task Reporter: Bo Li As a user, he/she may want to try multiple configuration sources. Need to support that. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-370) Metrics timer (like latency) output precision must to nano level not milli level
[ https://issues.apache.org/jira/browse/SCB-370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16387559#comment-16387559 ] ASF GitHub Bot commented on SCB-370: wujimin commented on a change in pull request #572: [SCB-370] Improve latency and max precision URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/572#discussion_r172466378 ## File path: metrics/metrics-core/src/main/java/org/apache/servicecomb/metrics/core/HighPrecisionBasicTimer.java ## @@ -0,0 +1,101 @@ +/* + * 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.servicecomb.metrics.core; + +import java.util.concurrent.TimeUnit; + +import org.apache.servicecomb.foundation.metrics.MetricsConst; + +import com.netflix.servo.monitor.BasicTimer; +import com.netflix.servo.monitor.Monitor; +import com.netflix.servo.monitor.MonitorConfig; +import com.netflix.servo.tag.Tags; + +//latency and max should return by default millisecond unit value for easy use +//because Timer is extends NumericMonitor so only can return Long result value and lost precision (value after the decimal point will be remove) +//warp BasicTimer, return custom Monitor for calculate double millisecond value +public class HighPrecisionBasicTimer extends BasicTimer { + private final MonitorForTimerValue timerValueMonitor; + + private final MonitorForTimerMax timerMaxMonitor; + + public MonitorForTimerValue getTimerValueMonitor() { +return timerValueMonitor; + } + + public MonitorForTimerMax getTimerMaxMonitor() { +return timerMaxMonitor; + } + + public HighPrecisionBasicTimer(MonitorConfig config) { +super(config, TimeUnit.NANOSECONDS); +this.timerValueMonitor = new MonitorForTimerValue(this); +this.timerMaxMonitor = new MonitorForTimerMax(this); + } + + class MonitorForTimerValue implements Monitor { + +private final BasicTimer timer; + +public MonitorForTimerValue(BasicTimer timer) { + this.timer = timer; +} + +@Override +public Double getValue() { + return this.getValue(0); +} + +@Override +public Double getValue(int pollerIndex) { + //we need direct div for keep value after the decimal point + long nanoValue = timer.getValue(); + return (double) nanoValue / (double) 100; Review comment: Output is ms , not second? this is not compatible with servo and spectator This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Metrics timer (like latency) output precision must to nano level not milli > level > > > Key: SCB-370 > URL: https://issues.apache.org/jira/browse/SCB-370 > Project: Apache ServiceComb > Issue Type: Sub-task > Components: Java-Chassis >Affects Versions: java-chassis-1.0.0-m1 >Reporter: yangyongzheng >Assignee: yangyongzheng >Priority: Major > Fix For: java-chassis-1.0.0-m1 > > > current metrics latency default unit is MILLISECONDS and low than 1 > milliseconds like 0.5 will return 0,we need support higher accuracy and keep > value after the decimal point -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Assigned] (SCB-370) Metrics timer (like latency) output precision must to nano level not milli level
[ https://issues.apache.org/jira/browse/SCB-370?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] yangyongzheng reassigned SCB-370: - Assignee: yangyongzheng > Metrics timer (like latency) output precision must to nano level not milli > level > > > Key: SCB-370 > URL: https://issues.apache.org/jira/browse/SCB-370 > Project: Apache ServiceComb > Issue Type: Sub-task > Components: Java-Chassis >Affects Versions: java-chassis-1.0.0-m1 >Reporter: yangyongzheng >Assignee: yangyongzheng >Priority: Major > Fix For: java-chassis-1.0.0-m1 > > > current metrics latency default unit is MILLISECONDS and low than 1 > milliseconds like 0.5 will return 0,we need support higher accuracy and keep > value after the decimal point -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-370) Metrics timer (like latency) output precision must to nano level not milli level
[ https://issues.apache.org/jira/browse/SCB-370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16387521#comment-16387521 ] ASF GitHub Bot commented on SCB-370: zhengyangyong opened a new pull request #572: [SCB-370] Improve latency and max precision URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/572 …ency and max latency precision of metrics Signed-off-by: zhengyangyongFollow this checklist to help us incorporate your contribution quickly and easily: - [ ] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/SCB) filed for the change (usually before you start working on it). Trivial changes like typos do not require a JIRA issue. Your pull request should address just this issue, without pulling in other changes. - [ ] Each commit in the pull request should have a meaningful subject line and body. - [ ] Format the pull request title like `[SCB-XXX] Fixes bug in ApproximateQuantiles`, where you replace `SCB-XXX` with the appropriate JIRA issue. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Run `mvn clean install` to make sure basic checks pass. A more thorough check will be performed on your pull request automatically. - [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf). --- If operation make two request with latency 1234567 nanoseconds and 7654321 nanoseconds Before : latency (average) output will be 4 milliseconds,and max output will be 7 milliseconds (value after the decimal point lost) Now : latency (average) output will be 4.44 milliseconds,and max output will be 7.654321 milliseconds This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Metrics timer (like latency) output precision must to nano level not milli > level > > > Key: SCB-370 > URL: https://issues.apache.org/jira/browse/SCB-370 > Project: Apache ServiceComb > Issue Type: Sub-task > Components: Java-Chassis >Affects Versions: java-chassis-1.0.0-m1 >Reporter: yangyongzheng >Priority: Major > Fix For: java-chassis-1.0.0-m1 > > > current metrics latency default unit is MILLISECONDS and low than 1 > milliseconds like 0.5 will return 0,we need support higher accuracy and keep > value after the decimal point -- This message was sent by Atlassian JIRA (v7.6.3#76005)