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

add barebones benchmark #177

Closed
wants to merge 3 commits into from
Closed

add barebones benchmark #177

wants to merge 3 commits into from

Conversation

edjroz
Copy link
Contributor

@edjroz edjroz commented Jul 8, 2022

This will run a benchmark of
N Dapps with up to X contract racking infos

Ideally we can remove logs from the context logger and iterate with a testingtable and different weights in a single run rather than have to run each benchmark individually.

@edjroz edjroz requested a review from iTiky July 8, 2022 14:54
@codecov
Copy link

codecov bot commented Jul 8, 2022

Codecov Report

Merging #177 (806f5a5) into main (e15b6f5) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #177   +/-   ##
=======================================
  Coverage   56.37%   56.37%           
=======================================
  Files          15       15           
  Lines        1247     1247           
=======================================
  Hits          703      703           
  Misses        496      496           
  Partials       48       48           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e15b6f5...806f5a5. Read the comment docs.

@edjroz
Copy link
Contributor Author

edjroz commented Jul 8, 2022

Following is the benchmark results with 3 different scenarios and scaling of contract tx infos (a higher amount of contract tx info might mean a different matter, such as an inneficient smart contract that requires multiple queries and calls):

goos: linux
goarch: amd64
pkg: github.com/archway-network/archway/x/gastracker/module
cpu: DO-Regular
BenchmarkRewards
BenchmarkRewards/1000_dappp_with:_1_contract_tx_info
BenchmarkRewards/1000_dappp_with:_1_contract_tx_info-2               100           1304990 ns/op
BenchmarkRewards/1000_dappp_with:_2_contract_tx_info
BenchmarkRewards/1000_dappp_with:_2_contract_tx_info-2               100           1937891 ns/op
BenchmarkRewards/1000_dappp_with:_3_contract_tx_info
BenchmarkRewards/1000_dappp_with:_3_contract_tx_info-2               100           2622026 ns/op
BenchmarkRewards/1000_dappp_with:_4_contract_tx_info
BenchmarkRewards/1000_dappp_with:_4_contract_tx_info-2               100           3433539 ns/op
BenchmarkRewards/1000_dappp_with:_5_contract_tx_info
BenchmarkRewards/1000_dappp_with:_5_contract_tx_info-2               100           4442534 ns/op
BenchmarkRewards/1000_dappp_with:_6_contract_tx_info
BenchmarkRewards/1000_dappp_with:_6_contract_tx_info-2               100           5324799 ns/op
BenchmarkRewards/1000_dappp_with:_7_contract_tx_info
BenchmarkRewards/1000_dappp_with:_7_contract_tx_info-2               100           5988770 ns/op
BenchmarkRewards/1000_dappp_with:_8_contract_tx_info
BenchmarkRewards/1000_dappp_with:_8_contract_tx_info-2               100           6521547 ns/op
BenchmarkRewards/1000_dappp_with:_9_contract_tx_info
BenchmarkRewards/1000_dappp_with:_9_contract_tx_info-2               100           7533513 ns/op
BenchmarkRewards/1000_dappp_with:_10_contract_tx_info
BenchmarkRewards/1000_dappp_with:_10_contract_tx_info-2              100           7676911 ns/op
BenchmarkRewards/1000_dappp_with:_11_contract_tx_info
BenchmarkRewards/1000_dappp_with:_11_contract_tx_info-2              100           9115699 ns/op
BenchmarkRewards/1500_dapps_with:_1_contract_tx_info
BenchmarkRewards/1500_dapps_with:_1_contract_tx_info-2               100           1865637 ns/op
BenchmarkRewards/1500_dapps_with:_2_contract_tx_info
BenchmarkRewards/1500_dapps_with:_2_contract_tx_info-2               100           3309783 ns/op
BenchmarkRewards/1500_dapps_with:_3_contract_tx_info
BenchmarkRewards/1500_dapps_with:_3_contract_tx_info-2               100           3995559 ns/op
BenchmarkRewards/1500_dapps_with:_4_contract_tx_info
BenchmarkRewards/1500_dapps_with:_4_contract_tx_info-2               100           4993565 ns/op
BenchmarkRewards/1500_dapps_with:_5_contract_tx_info
BenchmarkRewards/1500_dapps_with:_5_contract_tx_info-2               100           7219169 ns/op
BenchmarkRewards/1500_dapps_with:_6_contract_tx_info
BenchmarkRewards/1500_dapps_with:_6_contract_tx_info-2               100           7280767 ns/op
BenchmarkRewards/1500_dapps_with:_7_contract_tx_info
BenchmarkRewards/1500_dapps_with:_7_contract_tx_info-2               100           8214774 ns/op
BenchmarkRewards/1500_dapps_with:_8_contract_tx_info
BenchmarkRewards/1500_dapps_with:_8_contract_tx_info-2               100           9840164 ns/op
BenchmarkRewards/1500_dapps_with:_9_contract_tx_info
BenchmarkRewards/1500_dapps_with:_9_contract_tx_info-2               100          11063900 ns/op
BenchmarkRewards/1500_dapps_with:_10_contract_tx_info
BenchmarkRewards/1500_dapps_with:_10_contract_tx_info-2              100          12129504 ns/op
BenchmarkRewards/1500_dapps_with:_11_contract_tx_info
BenchmarkRewards/1500_dapps_with:_11_contract_tx_info-2              100          13120827 ns/op
BenchmarkRewards/3500_dapps_with:_1_contract_tx_info
BenchmarkRewards/3500_dapps_with:_1_contract_tx_info-2               100           4642783 ns/op
BenchmarkRewards/3500_dapps_with:_2_contract_tx_info
BenchmarkRewards/3500_dapps_with:_2_contract_tx_info-2               100           7501969 ns/op
BenchmarkRewards/3500_dapps_with:_3_contract_tx_info
BenchmarkRewards/3500_dapps_with:_3_contract_tx_info-2               100           9655599 ns/op
BenchmarkRewards/3500_dapps_with:_4_contract_tx_info
BenchmarkRewards/3500_dapps_with:_4_contract_tx_info-2               100          12678487 ns/op
BenchmarkRewards/3500_dapps_with:_5_contract_tx_info
BenchmarkRewards/3500_dapps_with:_5_contract_tx_info-2               100          15316492 ns/op
BenchmarkRewards/3500_dapps_with:_6_contract_tx_info
BenchmarkRewards/3500_dapps_with:_6_contract_tx_info-2               100          17591569 ns/op
BenchmarkRewards/3500_dapps_with:_7_contract_tx_info
BenchmarkRewards/3500_dapps_with:_7_contract_tx_info-2               100          20445459 ns/op
BenchmarkRewards/3500_dapps_with:_8_contract_tx_info
BenchmarkRewards/3500_dapps_with:_8_contract_tx_info-2               100          22782497 ns/op
BenchmarkRewards/3500_dapps_with:_9_contract_tx_info
BenchmarkRewards/3500_dapps_with:_9_contract_tx_info-2               100          27126570 ns/op
BenchmarkRewards/3500_dapps_with:_10_contract_tx_info
BenchmarkRewards/3500_dapps_with:_10_contract_tx_info-2              100          28307914 ns/op
BenchmarkRewards/3500_dapps_with:_11_contract_tx_info
BenchmarkRewards/3500_dapps_with:_11_contract_tx_info-2              100          30843744 ns/op
PASS
ok      github.com/archway-network/archway/x/gastracker/module  3519.772s

P.D: Alot of contract tx info were placed in order to have extensive amount of points to graph

@edjroz
Copy link
Contributor Author

edjroz commented Jul 8, 2022

Graph detailing how the algorithim scales with from having very little contract tx infos to inneficient ones
image

@edjroz edjroz linked an issue Jul 27, 2022 that may be closed by this pull request
@edjroz
Copy link
Contributor Author

edjroz commented Aug 10, 2022

This benchmark should be reworked on after #202

@edjroz edjroz closed this Aug 10, 2022
@fdymylja fdymylja deleted the edjroz/benchmark/begin-block branch August 25, 2022 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bench: benchmark TX execution overhead of the gastracking module.
1 participant