Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix error value type and rename variable #457

Merged
merged 1 commit into from
Jan 26, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,18 @@ public EntranceNode(ResourceWrapper id, ClusterNode clusterNode) {

@Override
public long avgRt() {
long rt = 0;
long total = 0;
long totalQps = 0;
for (Node node : getChildList()) {
rt += node.avgRt() * node.passQps();
total += node.avgRt() * node.passQps();
totalQps += node.passQps();
}
return rt / (totalQps == 0 ? 1 : totalQps);
return total / (totalQps == 0 ? 1 : totalQps);
}

@Override
public long blockQps() {
int blockQps = 0;
long blockQps = 0;
for (Node node : getChildList()) {
blockQps += node.blockQps();
}
Expand All @@ -82,7 +82,7 @@ public int curThreadNum() {

@Override
public long totalQps() {
int r = 0;
long r = 0;
for (Node node : getChildList()) {
r += node.totalQps();
}
Expand All @@ -91,7 +91,7 @@ public long totalQps() {

@Override
public long successQps() {
int r = 0;
long r = 0;
for (Node node : getChildList()) {
r += node.successQps();
}
Expand All @@ -100,7 +100,7 @@ public long successQps() {

@Override
public long passQps() {
int r = 0;
long r = 0;
for (Node node : getChildList()) {
r += node.passQps();
}
Expand Down