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

Make block benchmark #1569

Merged
merged 19 commits into from
May 4, 2023
Merged

Make block benchmark #1569

merged 19 commits into from
May 4, 2023

Conversation

Harrm
Copy link
Contributor

@Harrm Harrm commented Apr 17, 2023

Referenced issues

resolves #1393

Description of the Change

Add new kagome command 'benchmark' and subcommand 'block'. It runs the specified range of blocks several times and prints out the execution time, comparing it to the block weight.

Benefits

Measurement of kagome performance.

Possible Drawbacks

None expected.

@Harrm Harrm marked this pull request as ready for review April 24, 2023 08:10
@Harrm Harrm requested review from kamilsa and iceseer April 25, 2023 08:31
@Harrm Harrm self-assigned this Apr 25, 2023
@kamilsa kamilsa requested a review from turuslan April 26, 2023 07:10
node/main.cpp Show resolved Hide resolved
core/utils/storage_explorer.cpp Outdated Show resolved Hide resolved
core/network/impl/protocols/protocol_error.hpp Outdated Show resolved Hide resolved
Comment on lines +27 to +30
# https://docs.hunter.sh/en/latest/packages/pkg/benchmark.html
hunter_add_package(benchmark)
find_package(benchmark CONFIG REQUIRED)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not used

Suggested change
# https://docs.hunter.sh/en/latest/packages/pkg/benchmark.html
hunter_add_package(benchmark)
find_package(benchmark CONFIG REQUIRED)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We agreed that we would need it anyway in the near future so I'd rather keep it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then must update benchmark in soramitsu-hunter

cmake/Hunter/config.cmake Show resolved Hide resolved
Comment on lines +744 to +747
if (subcommand) {
argc--;
argv++;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should command remove first arg too?

core/application/impl/app_configuration_impl.cpp Outdated Show resolved Hide resolved
core/utils/benchmark_main.cpp Show resolved Hide resolved
core/benchmark/block_execution_benchmark.cpp Show resolved Hide resolved
core/storage/spaces.hpp Outdated Show resolved Hide resolved
@@ -13,7 +13,7 @@
#include <rapidjson/document.h>
#include <rapidjson/filereadstream.h>
#include <boost/algorithm/string.hpp>
#include <boost/filesystem.hpp>
#include "filesystem/common.hpp"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be moved down

@Harrm Harrm merged commit d93fb38 into master May 4, 2023
@Harrm Harrm deleted the feature/block-exec-benchmark branch May 4, 2023 08:11
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.

Runtime benchmarking
3 participants