Commit 60076264 authored by Matthias Linhuber's avatar Matthias Linhuber
Browse files

Implement FileSize configuration

parent 0a26589e
......@@ -23,6 +23,13 @@ QUICK_TEST_PARAM_LIST = [
[2**20, 2**0],
]
FILESIZES = {
"1G": 20,
"2G": 21,
"4G": 22,
"8G": 23
}
class TestRun():
"""
......@@ -239,11 +246,10 @@ def main():
help='Meausre only some block sizes')
parser.add_argument("--repetitions", '-r', default=3,
type=int, help='Meausre only some block sizes')
parser.add_argument(
"--fileSize", choices=["1G", "2G", "5G", "10G"], default="2G",
help="Define desired fileSize for all parameter sets - NOT IMPLEMENTED")
parser.add_argument("--fileSize", choices=FILESIZES.keys(),
help="Define desired fileSize for all parameter sets")
# Show testrun info
# Show testrun info
parser.add_argument("--testValues", action="store_true",
help="Show the test-values used for the measurements")
......@@ -266,17 +272,19 @@ def main():
print("Please only provide either --quick or --full. They are" +
" mutaliy exclusive")
# TODO: Use the command line parameter to fill this value
fileSize = 2**31
fileSizeExponent = int(math.log2(fileSize))
if args.full or args.fileSize is not None:
if args.fileSize is None:
fileSizeExponent = 20
else:
fileSizeExponent = FILESIZES[args.fileSize]
if args.full:
testParams = [[2**(i), 2**(fileSizeExponent - i)]
for i in range(fileSizeExponent)
if i >= fileSizeExponent/2 or i >= 10]
else:
testParams = QUICK_TEST_PARAM_LIST
# Print testValues and exit program
if args.testValues:
pprint(testParams)
return
......@@ -298,7 +306,7 @@ def main():
else:
# Print Table representation
resultManager.printResults(human=args.human,
table=not args.raw,
table=not args.json,
showAllRepetitions=not args.brief)
# Store test restult if desired by the user
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment