Skip to content

Commit

Permalink
Update DubboInvoke
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhiguo.Chen committed Aug 27, 2015
1 parent 34e3050 commit f598c54
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public String index(@ModelAttribute DubboInvoke dubboInvoke, Model model) {
}
dubboStatistics.setProviderSuccess(di.getSuccess());
dubboStatistics.setProviderFailure(di.getFailure());
dubboStatistics.setProviderAvgElapsed(di.getSuccess() != 0 ? di.getElapsed() / di.getSuccess() : 0);
dubboStatistics.setProviderAvgElapsed(di.getSuccess() != 0 ? Double.valueOf(String.format("%.4f", di.getElapsed() / di.getSuccess())) : 0);
dubboStatistics.setProviderMaxElapsed(di.getMaxElapsed());
dubboStatistics.setProviderMaxConcurrent(di.getMaxConcurrent());
}
Expand All @@ -76,7 +76,7 @@ public String index(@ModelAttribute DubboInvoke dubboInvoke, Model model) {
}
dubboStatistics.setConsumerSuccess(di.getSuccess());
dubboStatistics.setConsumerFailure(di.getFailure());
dubboStatistics.setConsumerAvgElapsed(di.getSuccess() != 0 ? di.getElapsed() / di.getSuccess() : 0);
dubboStatistics.setConsumerAvgElapsed(di.getSuccess() != 0 ? Double.valueOf(String.format("%.4f", di.getElapsed() / di.getSuccess())) : 0);
dubboStatistics.setConsumerMaxElapsed(di.getMaxElapsed());
dubboStatistics.setConsumerMaxConcurrent(di.getMaxConcurrent());
}
Expand Down
26 changes: 13 additions & 13 deletions src/main/java/com/handu/open/dubbo/monitor/domain/DubboInvoke.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ public class DubboInvoke implements Serializable {

private double elapsed;

private double concurrent;
private int concurrent;

private double maxElapsed;
private int maxElapsed;

private double maxConcurrent;
private int maxConcurrent;

private double invokeTime;
private long invokeTime;

// ====================查询辅助参数===================
/**
Expand Down Expand Up @@ -125,7 +125,7 @@ public void setId(String id) {
this.id = id;
}

public Long getTimeParticle() {
public long getTimeParticle() {
return timeParticle;
}

Expand Down Expand Up @@ -174,39 +174,39 @@ public void setElapsed(double elapsed) {
this.elapsed = elapsed;
}

public double getConcurrent() {
public int getConcurrent() {
return concurrent;
}

public void setConcurrent(double concurrent) {
public void setConcurrent(int concurrent) {
this.concurrent = concurrent;
}

public double getMaxElapsed() {
public int getMaxElapsed() {
return maxElapsed;
}

public void setMaxElapsed(double maxElapsed) {
public void setMaxElapsed(int maxElapsed) {
this.maxElapsed = maxElapsed;
}

public double getMaxConcurrent() {
public int getMaxConcurrent() {
return maxConcurrent;
}

public void setMaxConcurrent(double maxConcurrent) {
public void setMaxConcurrent(int maxConcurrent) {
this.maxConcurrent = maxConcurrent;
}

public void setTimeParticle(long timeParticle) {
this.timeParticle = timeParticle;
}

public double getInvokeTime() {
public long getInvokeTime() {
return invokeTime;
}

public void setInvokeTime(double invokeTime) {
public void setInvokeTime(long invokeTime) {
this.invokeTime = invokeTime;
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/**
* Copyright 2006-2015 handu.com
*
* Licensed 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 com.handu.open.dubbo.monitor.support;

import org.springframework.validation.FieldError;
Expand Down
15 changes: 15 additions & 0 deletions src/main/java/com/handu/open/dubbo/monitor/support/UuidUtil.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/**
* Copyright 2006-2015 handu.com
*
* Licensed 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 com.handu.open.dubbo.monitor.support;

import java.util.UUID;
Expand Down

0 comments on commit f598c54

Please sign in to comment.