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