def runPutTest(testDataPath, testDataRangeStart, testDataRangeEnd, f):
log.debug('running put tests...')
timeStart = time.perf_counter()
times = [time.perf_counter()]
for i in range(testDataRangeStart, testDataRangeEnd):
print(i)
thisPath = '%s/%i' % (testDataPath, i)
o = loadTestData(thisPath)
f.putObject(o, str(i))
times.append(time.perf_counter())
timeEnd = time.perf_counter()
log.warning('RESULT (PUT): total test runtime: %s seconds, mean per object: %s' % (
timeEnd - timeStart, ((timeEnd - timeStart) / testDataRangeEnd)))
log.critical('RESULT (PUT): median result: %s ' % statistics.median(calculateTimeDeltas(times)))
log.critical('RESULT (PUT): standard deviation result: %s ' % statistics.stdev(calculateTimeDeltas(times)))
log.critical('RESULT (PUT): mean result: %s ' % statistics.mean(calculateTimeDeltas(times)))
# log.critical('RESULT (PUT): individual times: %s ' % (calculateTimeDeltas(times)))
评论列表
文章目录