Last active
July 17, 2020 00:19
-
-
Save winstonleedev/cec2e31e4e8ccc8f0624888d1ad2317a to your computer and use it in GitHub Desktop.
Benchmark to extract keys and value from level db, and read them again from the new database
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Create smaller DB from big DB | |
sudo lev ~/caliper-scripts/generated/production/ledgersData/chains/index --all --limit 1000000 > ~/benchdb.export | |
sudo lev ~/benchdb --batch ~/benchdb.export | |
# Bench querying the big DB | |
{ time { sudo lev ~/caliper-scripts/generated/production/ledgersData/chains/index --keys > /dev/null; } } 2> ~/bigQuery.txt | |
# Bench querying the small DB | |
{ time { sudo lev ~/benchdb --keys > /dev/null; } } 2> ~/smallQuery.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment