-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcommands
39 lines (27 loc) · 1.25 KB
/
commands
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Maven build without running the tests:
$ mvn -Dmaven.test.skip=true clean package
# Maven run a class' main function
mvn exec:java -Dexec.mainClass="ch.bfh.blk2.bitcoin.blockchain2database.FooClass"
# Both of them togethre
mvn -Dmaven.test.skip=true clean package exec:java -Dexec.mainClass="ch.bfh.blk2.bitcoin.blockchain2database.FooClass"
# Recreate our database
mysql -h localhost -u root -p < db.sql
# Copy latest version to test machine
scp -r src/ pom.xml db.sql testnet3@btc:blockchain2database/
# Dump the database
mysqldump -h localhost -u root -p --databases testnet3 > targetfile.dmp
# Apply a dump to a DB
mysql -h localhost -u testnet3 -p < dumpfile.dmp
# See which kinds of error were thrown by the program
grep -vP "^\s" errorlog | sort |uniq
# Size of Database w/ and w/o indexes
> SELECT ROUND((SUM(data_length+index_length) / 1024 / 1024), 2) `Size in MB` FROM information_schema.TABLES WHERE table_schema = 'btc';
> SELECT ROUND((SUM(data_length) / 1024 / 1024), 2) `Size in MB` FROM information_schema.TABLES WHERE table_schema = 'btc';
# See inserting time predictions
grep "Inserting 1M" log
# Run flyway
mvn flyway:migrate
# Run flyway for testnet3
mvn flyway:migrate@testnet3
# Reset database
mvn flyway:clean@testnet3 flyway:migrate@testnet3