Conversation
Codecov Report
@@ Coverage Diff @@
## master #908 +/- ##
=======================================
Coverage 45.16% 45.16%
=======================================
Files 178 178
Lines 12608 12608
=======================================
Hits 5695 5695
Misses 6913 6913Continue to review full report at Codecov.
|
|
Can this really speed up multisig ut? |
vncoelho
left a comment
There was a problem hiding this comment.
Sounds good, Shargon.
Good idea.
|
@vncoelho Did you test it? |
|
Yes, worked normally. I am having problems with #905 |
|
Worked normally only, or faster? |
|
I did not benchmark, @erikzhang. For being sure about that we would need to run a loop and count the time. Do you think that we should do that for being sure before merging, @shargon? |
|
We should do that for being sure before approving. @vncoelho |
|
Let's check it out. |
|
For replications of the following loop: double avgTime = 0;
int nIter = 10;
for (int i = 0; i < nIter; i++)
{
Stopwatch sw0 = new Stopwatch();
sw0.Start();
var aa = walletA.CreateAccount();
var bb = walletB.CreateAccount();
sw0.Stop();
TimeSpan elapsed = sw0.Elapsed;
avgTime += elapsed.Seconds;
}
Console.WriteLine($"Elapsed={avgTime / nIter}");
avgTime = 0;
for (int i = 0; i < nIter; i++)
{
Stopwatch sw0 = new Stopwatch();
sw0.Start();
var ta = new Task<WalletAccount>(() => walletA.CreateAccount());
var tb = new Task<WalletAccount>(() => walletA.CreateAccount());
ta.Start();
tb.Start();
Task.WaitAll(ta, tb);
var aa = ta.Result;
var bb = tb.Result;
sw0.Stop();
TimeSpan elapsed = sw0.Elapsed;
avgTime += elapsed.Seconds;
}
Console.WriteLine($"ElapsedNew={avgTime/nIter}");For Elapsed=6.2
ElapsedNew=3.1For Elapsed=61
ElapsedNew=32I also learned to run with a filter, now I am dominating these dotnet tests! ahueahueaea |
|
from 8 seconds to 6 in my laptop |
|
You should take into account that |
|
@vncoelho,Pls double check the below code,and re-test, thanks! var tb = new Task(() => walletA.CreateAccount()); |
|
That is true, @i359, you are right. Thanks for taking a careful look! But results will be similar. I think that I will not re-run this, because the result matched the theoretical expectation...aheuahuea |
|
@vncoelho, The following test results are amazing, and it is recommended to use the modified code to For nIter = 10 |
|
Sometimes science is made of empirical tests...aheuahuea |
|
@vncoelho, the below code only create walletA, no create walletB, so save about half time, var ta = new Task(() => walletA.CreateAccount()); |
|
You are blowing my mind now, it is 1am here. |
|
I run the tests 2 times until remember that we need to fail for printing messages...aheuahea Here it is, @i359. The same result... O.o 💃 Elapsed=6
ElapsedNew=3Anyway, it is always good to wonder. |
|
i have a mistake... |
|
Please if some mistake are found, remove the approve 🙏 |
|
@i359, I thought the mistake was just on my loop for testing... |
) * Update introduction.md * Update and rename format.md to common.md * Update common.md * Update common.md * Remove redundant content. * Remove redundant content. * Minor change. * Minor change. * Minor change. * Minor change. * Minor change. * Minor change. * Minor change. * Minor change. * Minor fix. * Fix JSON format. * Fix JSON format. * Fix JSON format. * Fix JSON format. * Fix format. * Fix JSON format. * Fix JSON format. * Fix JSON format. * Fix JSON format. * Fix JSON format. * Fix JSON format. * Minor fix. * Minor fix. * Minor fix. * Minor fix. * Fix content and format. * Fix content and format. * Fix content. * Minor fix. * Fix content. * Fix content. * Minor fix. * Minor fix. * Fix content. * Fix content. * Minor fix. * Minor fix. * Minor fix. * Minor fix.
* Speedup multisign ut * Start tasks
…ct#905 (cschuchardt88) Added icon to applications neo-project#908 (cschuchardt88)
…ct#905 (cschuchardt88) Added icon to applications neo-project#908 (cschuchardt88)
…ct#905 (cschuchardt88) Added icon to applications neo-project#908 (cschuchardt88)
No description provided.