neo-modules
neo-modules copied to clipboard
Performance Monitor Plugin
This is a plugin created to monitor some aspects of Neo. The metrics that the plugin measures are the ones discussed in neo#920
@meevee98 Gread work! But there are some issues need to be fixed. test commit : 45b10a0 with neo-cli: master e5400583a41bd19d4f2db5e05ca59a6c04160853 neo: master ff850c5e170a8a132132de9aea6168b0668125aa neo-vm: master 754bca3568c50695c571cb796c500fd66c07d0fe
- block time <index/hash> current block height is 310, result of block time 301, 303 is incorrect.
neo> block time 301
Block Hash: 0x1642a8e70d21a1651cba7fd9f22e4d6d05b69a93fe09119bc753a082db5194f7
Index: 301
Time: 127 seconds
neo> block time 302
Block Hash: 0x35716ca313de935d230d6e5959028a98697374918b56743a95c0eeadd7f1f3ad
Index: 302
Time: 15 seconds
neo> block time 303
Block Hash: 0x5367caa58473c2d82fdf340d715e9381d612f180fd8cd95f254ee4467072e276
Index: 303
Time: 303 seconds
- When the height increased to 550, block avgtime 550, the result is incorrect.
neo> block avgtime 7
Average time/block: 15.06 seconds
neo> block avgtime 8
Average time/block: 15.06 seconds
neo> block avgtime 9
Average time/block: 15.06 seconds
neo> block avgtime 30
Average time/block: 18.77 seconds
neo> block avgtime 100
Average time/block: 16.76 seconds
neo> block avgtime 101
Average time/block: 16.75 seconds
neo> block avgtime 102
Average time/block: 16.75 seconds
neo> block avgtime 103
Average time/block: 16.75 seconds
neo> block avgtime 104
Average time/block: 16.73 seconds
neo> block avgtime 550
Average time/block: 1112.98 seconds
neo> block avgtime 551
Average time/block: 1112.98 seconds
-
check disk Both on Win10/Ubuntu, check disk return error: Performance counters are not supported on this platform.

-
check memory on Ubuntu 18.04, check memory return 0.00 MB

-
tx avgsize [1 - 10000] There are total 2 txs for the test private chain. while tx avgsize 3 is not equal to tx avgsize 2.

-
confirmation time & payload time
always return Timeout.
neo> confirmation time
Waiting for the next commit...
Timeout
neo> confirmation time
Waiting for the next commit...
Timeout
neo> payload time
Waiting for the next payload...
Timeout
- Network Commands: connected, when current height update, height in the result of "connected" does not update. for example, height is always 578, while getconnectioncount is 580.
neo> connected
Connected nodes: 1
ip: 127.0.0.1 height: 578
Thank you for your tests @cloud8little
- block time <index/hash> current block height is 310, result of block time 301, 303 is incorrect.
- When the height increased to 550, block avgtime 550, the result is incorrect.
I couldn't reproduce, can you give me more details?
- check disk Both on Win10/Ubuntu, check disk return error: Performance counters are not supported on this platform.
For this to work, you need to add System.Diagnostics.PerformanceCounter as a dependency in neo-cli, otherwise it won't not work, even if you include the dll in the folder.
I've added it in neo-node#549
- confirmation time & payload time always return Timeout.
Confirmation and payload time only work after start consensus, that's why it always returns a timeout. I've changed the printed message to make this condition clearer.
@meevee98 hi, I wrote a readme giving the description about the commands of the plugin, as well as some notable points to ease the use. Hope to have your opinion.
@meevee98
- you can try "block time 147" in this private chain. block-time-147-incorrect.zip

-
already add this reference. https://github.com/neo-project/neo-node/pull/549, while the result is the same: error: Performance counters are not supported on this platform.
-
the same chain with 1, you can wait the block height to 170+.

@meevee98 hi, I wrote a readme giving the description about the commands of the plugin, as well as some notable points to ease the use. Hope to have your opinion.
Thank you for your help @bettybao1209. I think the readme is very good.
- you can try "block time 147" in this private chain. block-time-147-incorrect.zip
I investigated the problem and I think this is not wrong at all.
Using the show block command from this pull request to show the information of the block, we can see that there is a more than 4 minutes gap between the blocks 147 and 148.

That's why the result of block time was 270 seconds (4 minutes and 30 seconds). Also, that's why I think it's not the wrong result: this result means that block 148 delayed, so the 147 remained active longer than it should.
- the same chain with 1, you can wait the block height to 170+.
For this, the problem was that some blocks had a much longer time in seconds, increasing the average. I found that these three blocks had a time greater than 4 hours, with the longest between blocks 100 and 101, with a gap of almost 2 days:

Probably that happened because the blockchain was paused and continued later.
I'm still working on the problem with Performance Counter.
Could you add port for connected?
When more than one peer on an ip, the return value is confusing.
And when I ping the specified ip, it will only return one.

I'm still working on the problem with Performance Counter, but since the only command that's having this issue is check disk, I removed it from this pull request.
I will include the command again in a future pull request when I can fix the Performance Counter
Hi @meevee98 , since we have a refactor on neo-node https://github.com/neo-project/neo-node/pull/536, now we have to make some corresponding adjustments on modules , to make the module commands could be called on neo-cli. Just like https://github.com/neo-project/neo-modules/pull/187
I'm a bit concerned about that, when I use block sync, if it keeps waiting for the next block, the CPU usage will keep high until time out.


@meevee98 it's this solved? https://github.com/neo-project/neo-modules/pull/188#issuecomment-607162568
@neo-project/ngd-shanghai could someone test it?
@neo-project/ngd-shanghai could someone test it?
@cloud8little will help test this.
- help message: PASS

-
block avgtime PASS

-
block sync PASS


-
block time PASS

-
block timesincelast PASS

-
block timestamp PASS

-
connected PASS

-
ping PASS

-
rpc time PASS

-
check state PASS

-
tx avgsize xx PASS

-
tx size PASS

-
without RpcServer PASS

-
commit time/confirmation time/payload time @meevee98 seems when starting a consensus node, payload/confirmation always timeout. when starting consensus as watch only, it returns value.

@meevee98 could you help answer the #14 please? https://github.com/neo-project/neo-modules/pull/188#issuecomment-657949676
Hi @Liaojinghui, @meevee98 is my colleague. Do you guys still have interest in this PR? I don't know why it was forgotten 😅
@meevee98 could you help answer the https://github.com/neo-project/neo-modules/pull/14 please? https://github.com/neo-project/neo-modules/pull/188#issuecomment-657949676
Is this still relevant?
it doesnt support other OS, like linux. And never fixed anything, from what i can see.
close as inactive