Changeset: 0d2381816915 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0d2381816915
Modified Files:
monetdb5/extras/pyapi/Benchmarks/monetdb_testing.py
Branch: pyapi
Log Message:
Only run memory measuring benchmark once for each testing size because memory
usage shouldn't vary between tests.
diffs (34 lines):
diff --git a/monetdb5/extras/pyapi/Benchmarks/monetdb_testing.py
b/monetdb5/extras/pyapi/Benchmarks/monetdb_testing.py
--- a/monetdb5/extras/pyapi/Benchmarks/monetdb_testing.py
+++ b/monetdb5/extras/pyapi/Benchmarks/monetdb_testing.py
@@ -158,19 +158,19 @@ if str(args_input_database).lower() == "
def run_test(testcommand, testcommand_nomem, *measurements):
if hot_test: cursor.execute(testcommand_nomem) #run the test once to
warm up
+ if testcommand != None:
+ # clear the result file
+ result_file = open(temp_file, 'w+')
+ result_file.close()
+ # run the command
+ cursor.execute(testcommand)
+ # now read the memory value from the file
+ result_file = open(temp_file, 'r')
+ pyapi_results = result_file.readline().translate(None,
'\n').split('\t')
+ result_file.close()
+ memory = float(pyapi_results[0]) / 1000**2
for i in range(0,test_count):
total_time, memory, pyapi_time = 0, 0, 0
- if testcommand != None:
- # clear the result file
- result_file = open(temp_file, 'w+')
- result_file.close()
- # run the command
- cursor.execute(testcommand)
- # now read the memory value from the file
- result_file = open(temp_file, 'r')
- pyapi_results = result_file.readline().translate(None,
'\n').split('\t')
- result_file.close()
- memory = float(pyapi_results[0]) / 1000**2
# now run the normal test (with malloc tracking disabled)
result_file = open(temp_file, 'w+')
result_file.close()
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list