Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
3dacbad
start generate-data command
Aug 27, 2020
f22d767
Create command that generates DB for test
Aug 27, 2020
729c51c
adding perf script
Sep 3, 2020
fb2ead9
Create perf checker
Sep 10, 2020
932e27f
Flush data frequently
Sep 10, 2020
a452801
Make the number of write customizable
Sep 10, 2020
4fb77e7
Use different db directories for performance check
Sep 14, 2020
bdf1371
Write log of test
Sep 14, 2020
ef3eb78
Print the db read count
Sep 14, 2020
c03cb48
Use debug info
Sep 14, 2020
c14e44d
adding db read script
Sep 14, 2020
4adc309
Use local rust rocksdb
Sep 15, 2020
5d29017
Print RocksdbStatstics
Sep 15, 2020
d1c609e
Add read-db command option
Sep 23, 2020
b710bad
Log used time to read a db value deeply
Sep 23, 2020
59d9ae3
Do not print rocksdb statistics in perf-write command
Sep 23, 2020
d505184
Print rocks db statistics in read-db command
Sep 23, 2020
8846825
Print full key
Sep 23, 2020
496e0a6
Log get_cf_opt time 10 times if it is slow
Sep 23, 2020
e951892
Print debug information in read-db
Sep 23, 2020
10c50f9
Add read-toplevel subcommand
Sep 24, 2020
d1cf5f7
Set cache from environment variable
Sep 24, 2020
518e396
Do not get multiple time from DB
Sep 24, 2020
e3cca76
Make perf-write and read-toplevel commands receive root from env vari…
Oct 5, 2020
0f19484
Make read_toplevel receive string key and get prepare number
Oct 5, 2020
d87f93d
Run formatter
Oct 5, 2020
29e9f2a
Add execute-block command
Oct 5, 2020
d7f334c
Print db usage in term_close
Oct 6, 2020
3a9af39
Add read_from_cache information in debug_info
Oct 6, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ codechain-crypto = { git = "https://github.com/CodeChain-io/rust-codechain-crypt
codechain-discovery = { path = "discovery" }
codechain-logger = { path = "util/logger" }
codechain-key = { path = "key" }
journaldb = { path = "./util/journaldb" }
codechain-keystore = { path = "keystore" }
codechain-merkle = { path = "util/merkle" }
codechain-network = { path = "network" }
Expand All @@ -35,6 +36,7 @@ ctrlc = { git = "https://github.com/paritytech/rust-ctrlc.git" }
fdlimit = "0.1"
finally-block = "0.1"
futures = "0.1"
rustc-hex = "1.0"
kvdb = { path = "util/kvdb" }
kvdb-rocksdb = { path = "util/kvdb-rocksdb" }
log = "0.4.6"
Expand All @@ -51,10 +53,14 @@ serde_json = "1.0"
tokio-core = "0.1.17"
toml = "0.4"
cidr = "0.0.4"
rocksdb = { git = "https://github.com/paritytech/rust-rocksdb", rev = "ecf06adf3148ab10f6f7686b724498382ff4f36e" }

[build-dependencies]
vergen = "2"

[patch."https://github.com/paritytech/rust-rocksdb"]
rocksdb = { path = "./rust-rocksdb/" }

[[bin]]
path = "codechain/main.rs"
name = "codechain"
Expand All @@ -74,4 +80,5 @@ members = [
"sync",
"types",
"vm",
"rust-rocksdb",
]
69 changes: 69 additions & 0 deletions codechain/codechain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -379,3 +379,72 @@ subcommands:
- accountId
- commit-hash:
about: Print the commit hash at the build time.
- perf-write:
about: Check the write performance
args:
- db-dir:
short: d
long: db-dir
help: The db directory
takes_value: true
- number:
short: n
long: number
help: Set the number of db values
takes_value: true
- generate-data:
about: Generate large trie for test
args:
- number:
short: n
long: number
help: Set the number of db values
takes_value: true
- read-db:
about: Read a value from DB
args:
- db-dir:
short: d
long: db-dir
help: The db directory
takes_value: true
- key:
short: k
long: key
help: The key to find a value in DB
takes_value: true
- read-toplevel:
about: Read a value from Toplevel state
args:
- prepare:
short: p
long: prepare
help: if key is n, read 0..n keys before reading the key
takes_value: true
- db-dir:
short: d
long: db-dir
help: The db directory
takes_value: true
- key:
short: k
long: key
help: The key to find a value in DB
takes_value: true
- key-str:
long: key-str
help: The key to find a value in DB
takes_value: true
- execute-block:
about: Execute a block
args:
- db-dir:
short: d
long: db-dir
help: The db directory
takes_value: true
- block-num:
short: n
long: block-num
help: The number of a block
takes_value: true
4 changes: 4 additions & 0 deletions codechain/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.

extern crate rocksdb;
extern crate rustc_hex;
#[macro_use]
extern crate clap;
extern crate futures;
Expand All @@ -35,6 +37,7 @@ extern crate codechain_keystore as ckeystore;
#[macro_use]
extern crate codechain_logger as clogger;
extern crate cidr;
extern crate codechain_crypto as ccrypto;
extern crate codechain_network as cnetwork;
extern crate codechain_rpc as crpc;
extern crate codechain_state as cstate;
Expand All @@ -45,6 +48,7 @@ extern crate ctrlc;
extern crate env_logger;
extern crate fdlimit;
extern crate finally_block;
extern crate journaldb;
extern crate kvdb;
extern crate kvdb_rocksdb;
extern crate never_type;
Expand Down
Loading