forked from mshuaic/Blockchain_med
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
38 lines (32 loc) · 852 Bytes
/
main.py
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
# 07/21/2018
# swtich to new benchmark suite
import benchmark2 as benchmark
import sys
import logging
# from memory_profiler import profile
from time import sleep
logging.basicConfig(level=logging.INFO, format='%(message)s')
# print(result)
# @profile
def main():
if len(sys.argv) > 1:
baseline = sys.argv[1]
else:
baseline = "baseline1"
benchmark.loadBaseline(baseline)
benchmark.init()
benchmark.loadTestCases()
benchmark.insertionTest()
sleep(2)
print("\n")
benchmark.pointQueryTest()
print("\n")
benchmark.rangeQueryTest()
print("\n")
benchmark.andQueryTest()
print("\n")
benchmark.storageTest()
benchmark.save2Json(baseline + '.json')
# benchmark.save2Json(str(FILE_SIZE)+'.json')
if __name__ == "__main__":
main()