This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-java-chassis.git
commit 72399e9c39bbb1774a6fd9f286670992db4c224a Author: zhengyangyong <[email protected]> AuthorDate: Wed Dec 27 17:35:38 2017 +0800 SCB-126 fix ci failed Signed-off-by: zhengyangyong <[email protected]> --- core/src/main/java/io/servicecomb/core/Invocation.java | 4 ++-- .../io/servicecomb/metrics/core/TestEventAndRunner.java | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/core/src/main/java/io/servicecomb/core/Invocation.java b/core/src/main/java/io/servicecomb/core/Invocation.java index ec9abe6..40a79d1 100644 --- a/core/src/main/java/io/servicecomb/core/Invocation.java +++ b/core/src/main/java/io/servicecomb/core/Invocation.java @@ -197,14 +197,14 @@ public class Invocation extends SwaggerInvocation { public void triggerStartProcessingEvent() { this.startProcessingTime = System.nanoTime(); EventUtils.triggerEvent(new InvocationStartProcessingEvent( - operationMeta.getMicroserviceQualifiedName(),this.invocationType, startProcessingTime, startProcessingTime - startTime)); + operationMeta.getMicroserviceQualifiedName(), this.invocationType, startProcessingTime - startTime)); } public void triggerFinishedEvent() { long finishedTime = System.nanoTime(); EventUtils .triggerEvent(new InvocationFinishedEvent(operationMeta.getMicroserviceQualifiedName(), - this.invocationType, finishedTime, finishedTime - startProcessingTime, + this.invocationType, finishedTime - startProcessingTime, finishedTime - startTime)); } } diff --git a/metrics/metrics-core/src/test/java/io/servicecomb/metrics/core/TestEventAndRunner.java b/metrics/metrics-core/src/test/java/io/servicecomb/metrics/core/TestEventAndRunner.java index d9a7e2b..63d2275 100644 --- a/metrics/metrics-core/src/test/java/io/servicecomb/metrics/core/TestEventAndRunner.java +++ b/metrics/metrics-core/src/test/java/io/servicecomb/metrics/core/TestEventAndRunner.java @@ -77,33 +77,33 @@ public class TestEventAndRunner { //fun1 is a PRODUCER invocation call twice and all is completed EventUtils.triggerEvent(new InvocationStartedEvent("fun1", InvocationType.PRODUCER, System.nanoTime())); EventUtils.triggerEvent( - new InvocationStartProcessingEvent("fun1", InvocationType.PRODUCER, System.nanoTime(), + new InvocationStartProcessingEvent("fun1", InvocationType.PRODUCER, TimeUnit.MILLISECONDS.toNanos(100))); EventUtils - .triggerEvent(new InvocationFinishedEvent("fun1", InvocationType.PRODUCER, System.nanoTime(), + .triggerEvent(new InvocationFinishedEvent("fun1", InvocationType.PRODUCER, TimeUnit.MILLISECONDS.toNanos(200), TimeUnit.MILLISECONDS.toNanos(300))); EventUtils.triggerEvent(new InvocationStartedEvent("fun1", InvocationType.PRODUCER, System.nanoTime())); EventUtils.triggerEvent( - new InvocationStartProcessingEvent("fun1", InvocationType.PRODUCER, System.nanoTime(), + new InvocationStartProcessingEvent("fun1", InvocationType.PRODUCER, TimeUnit.MILLISECONDS.toNanos(300))); EventUtils - .triggerEvent(new InvocationFinishedEvent("fun1", InvocationType.PRODUCER, System.nanoTime(), + .triggerEvent(new InvocationFinishedEvent("fun1", InvocationType.PRODUCER, TimeUnit.MILLISECONDS.toNanos(400), TimeUnit.MILLISECONDS.toNanos(700))); //fun3 is a PRODUCER invocation call uncompleted EventUtils.triggerEvent(new InvocationStartedEvent("fun3", InvocationType.PRODUCER, System.nanoTime())); EventUtils.triggerEvent( - new InvocationStartProcessingEvent("fun3", InvocationType.PRODUCER, System.nanoTime(), + new InvocationStartProcessingEvent("fun3", InvocationType.PRODUCER, TimeUnit.MILLISECONDS.toNanos(500))); //fun2 is a CONSUMER invocation call once and completed EventUtils.triggerEvent(new InvocationStartedEvent("fun2", InvocationType.CONSUMER, System.nanoTime())); EventUtils.triggerEvent( - new InvocationStartProcessingEvent("fun2", InvocationType.CONSUMER, System.nanoTime(), + new InvocationStartProcessingEvent("fun2", InvocationType.CONSUMER, TimeUnit.MILLISECONDS.toNanos(100))); EventUtils - .triggerEvent(new InvocationFinishedEvent("fun2", InvocationType.CONSUMER, System.nanoTime(), + .triggerEvent(new InvocationFinishedEvent("fun2", InvocationType.CONSUMER, TimeUnit.MILLISECONDS.toNanos(200), TimeUnit.MILLISECONDS.toNanos(300))); //fun4 is a invocation call only started and no processing start and finished -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
