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

Revert "Revert "Release 2.0.0 rc3"" #292

Merged
merged 23 commits into from
Jun 13, 2019
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
fb7a84f
update test
May 19, 2019
7058ed5
fix bugs
May 24, 2019
ead0002
Merge remote-tracking branch 'upstream/release-2.0.0-rc3' into releas…
morebtcg May 24, 2019
c6bfb70
fix performance test
morebtcg May 24, 2019
759616a
fix performance
morebtcg May 27, 2019
6c341d6
Merge remote-tracking branch 'upstream/release-2.0.0-rc3' into releas…
morebtcg May 27, 2019
620bda9
fix status
fqliao May 30, 2019
ccf1ff6
Merge pull request #289 from fqliao/release-2.0.0-rc3
fqliao Jun 1, 2019
6621ed4
Revert "Revert "Release 2.0.0 rc3""
bxq2011hust Jun 4, 2019
51f062f
Merge pull request #293 from FISCO-BCOS/release-2.0.0-rc3
bxq2011hust Jun 5, 2019
728c20f
update performance test
Jun 10, 2019
acb5dab
Merge remote-tracking branch 'upstream/release-2.0.0-rc3' into
Jun 10, 2019
519ee75
remove static nodeToBlockNumberMap
fqliao Jun 11, 2019
d843384
modify public for bin and set tableName to tableInfo
fqliao Jun 11, 2019
11f2cec
Merge pull request #298 from morebtcg/release-2.0.0-rc3
fqliao Jun 11, 2019
44ba93f
modify error code
fqliao Jun 12, 2019
ea301c1
Merge pull request #299 from fqliao/release-2.0.0-rc3
fqliao Jun 12, 2019
3783c7b
Merge pull request #300 from fqliao/release-2.0.0-rc3
fqliao Jun 12, 2019
390ab79
modify BCOS_VERSION from private to public
fqliao Jun 12, 2019
9054e6a
Merge pull request #303 from fqliao/release-2.0.0-rc3
fqliao Jun 13, 2019
08b36a9
Merge pull request #302 from fqliao/release-2.0.0-rc3
fqliao Jun 13, 2019
38c4a7f
Merge pull request #307 from FISCO-BCOS/release-2.0.0-rc3
bxq2011hust Jun 13, 2019
43a732e
make receipt error more friendly and format code
vita-dounai Jun 13, 2019
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
2 changes: 1 addition & 1 deletion src/main/java/org/fisco/bcos/channel/client/Service.java
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ public void run(Timeout timeout) throws Exception {
bcosMessage.getSeq());

} catch (Exception e) {
logger.error("system error: " + e.getMessage());
logger.error("system error: " + e);

BcosResponse response = new BcosResponse();
response.setErrorCode(-1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ public void run() {
}
});
}

} catch (RejectedExecutionException e) {
logger.error("threadPool is full, reject to request", e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ public void onConnect(ChannelHandlerContext ctx) {
ctx.writeAndFlush(out);

queryBlockNumberForSelectNodes(ctx);

} catch (Exception e) {
logger.error("error:", e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public void retrySendRemoteMessage() {
} else {
// ethereum消息,不用改类型
}

message.setResult(99);

ByteBuf out = localConnection.alloc().buffer();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,12 @@ public SendTransaction sendTransaction(
Request<?, SendTransaction> request = web3j.sendRawTransaction(signedTransaction);
request.setNeedTransCallback(true);
request.setTransactionSucCallback(callback);
SendTransaction ethSendTransaction = request.send();

request.sendOnly();

return null;

/*
if (ethSendTransaction != null && !ethSendTransaction.hasError()) {
String txHashLocal = Hash.sha3(signedTransaction);
String txHashRemote = ethSendTransaction.getTransactionHash();
Expand All @@ -180,6 +184,7 @@ public SendTransaction sendTransaction(
}

return ethSendTransaction;
*/
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,10 @@ public void onResponse(TransactionReceipt receipt) {

if (callBackType.compareTo("set") == 0) { // add test
dagUserMgr.addUser(user);
} else if (callBackType.compareTo("transfer") == 0
|| callBackType.compareTo("transferRevert") == 0) { // transfer test
} else if (callBackType.compareTo("transfer") == 0) { // transfer test
fromUser.decrease(amount);
toUser.increase(amount);
} else if (callBackType.compareTo("transferRevert") == 0) { // tranfer revert test
fromUser.decrease(amount);
toUser.increase(amount);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package org.fisco.bcos.channel.test.parallel.parallelok;

import de.vandermeer.asciitable.AsciiTable;
import de.vandermeer.skb.interfaces.transformers.textformat.TextAlignment;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;
import org.fisco.bcos.web3j.protocol.core.methods.response.TransactionReceipt;
Expand Down Expand Up @@ -47,7 +45,7 @@ public boolean isEnd() {
public void onMessage(TransactionReceipt receipt, Long cost) {
try {
if (!receipt.isStatusOK()) {
// System.out.println("receipt error! status: " + receipt.getStatus());
System.out.println("receipt error! status: " + receipt.getStatus());
error.addAndGet(1);
}

Expand Down Expand Up @@ -85,90 +83,71 @@ public void onMessage(TransactionReceipt receipt, Long cost) {
totalCost.addAndGet(cost);

if (isEnd()) {
System.out.println("total");

//
Long totalTime = System.currentTimeMillis() - startTimestamp;

System.out.println(
"===================================================================");
System.out.println("Summary");

System.out.println("Total transactions: " + String.valueOf(total));
System.out.println("Total time: " + String.valueOf(totalTime) + "ms");
System.out.println("TPS: " + String.valueOf(total / ((double) totalTime / 1000)));
System.out.println(
"===================================================================");
"Avg time cost: " + String.valueOf(totalCost.get() / total) + "ms");
System.out.println(
"Error rate: "
+ String.valueOf(((double)error.get() / (double)received.get()) * 100)
+ "%");
System.out.println(
"Return Error rate: "
+ String.valueOf(((double)ret_error.get() / (double)received.get()) * 100)
+ "%");

AsciiTable at = new AsciiTable();
at.addRule();
at.addRow(null, "Performance");
at.addRule();
at.addRow("Total transactions", total);
at.addRule();
at.addRow("Total sent", total - error.get());
at.addRule();
at.addRow("Total error", error.get());
at.addRule();
at.addRow("Error rate", (error.get() / (double) received.get()) * 100 + "%");
at.addRule();
at.addRow(
"Return error rate",
(ret_error.get() / (double) received.get()) * 100 + "%");
at.addRule();
at.addRow("Elapsed time", totalTime + " ms");
at.addRule();
at.addRow(
"TPS",
String.format("%.2f", (total - error.get()) / ((double) totalTime / 1000)));
at.addRule();

at.getContext().setWidth(40);
at.setTextAlignment(TextAlignment.CENTER);

String atRender = at.render();
System.out.println(atRender + "\n");

at = new AsciiTable();
at.addRule();
at.addRow(null, null, "Time Area");
at.addRule();
at.addRow(
"0 < time < 50ms",
less50,
String.format("%.2f%%", (double) less50.get() / total * 100));
at.addRule();
at.addRow(
"50 < time < 100ms",
less100,
String.format("%.2f%%", (double) less100.get() / total * 100));
at.addRule();
at.addRow(
"100 < time < 200ms",
less200,
String.format("%.2f%%", (double) less200.get() / total * 100));
at.addRule();
at.addRow(
"200 < time < 400ms",
less400,
String.format("%.2f%%", (double) less400.get() / total * 100));
at.addRule();
at.addRow(
"400 < time < 1000ms",
less1000,
String.format("%.2f%%", (double) less1000.get() / total * 100));
at.addRule();
at.addRow(
"1000 < time < 2000ms",
less2000,
String.format("%.2f%%", (double) less2000.get() / total * 100));
at.addRule();
at.addRow(
"2000 < time",
timeout2000,
String.format("%.2f%%", (double) timeout2000.get() / total * 100));
at.addRule();
at.addRow("Average time cost", null, totalCost.get() / total + " ms");
at.addRule();

at.getContext().setWidth(80);
at.setTextAlignment(TextAlignment.CENTER);

atRender = at.render();
System.out.println(atRender);
System.out.println("Time area:");
System.out.println(
"0 < time < 50ms : "
+ String.valueOf(less50)
+ " : "
+ String.valueOf((double) less50.get() / total * 100)
+ "%");
System.out.println(
"50 < time < 100ms : "
+ String.valueOf(less100)
+ " : "
+ String.valueOf((double) less100.get() / total * 100)
+ "%");
System.out.println(
"100 < time < 200ms : "
+ String.valueOf(less200)
+ " : "
+ String.valueOf((double) less200.get() / total * 100)
+ "%");
System.out.println(
"200 < time < 400ms : "
+ String.valueOf(less400)
+ " : "
+ String.valueOf((double) less400.get() / total * 100)
+ "%");
System.out.println(
"400 < time < 1000ms : "
+ String.valueOf(less1000)
+ " : "
+ String.valueOf((double) less1000.get() / total * 100)
+ "%");
System.out.println(
"1000 < time < 2000ms : "
+ String.valueOf(less2000)
+ " : "
+ String.valueOf((double) less2000.get() / total * 100)
+ "%");
System.out.println(
"2000 < time : "
+ String.valueOf(timeout2000)
+ " : "
+ String.valueOf((double) timeout2000.get() / total * 100)
+ "%");
}

} catch (Exception e) {
Expand Down
Loading