From 67d3dd0593acc73d3fa54441232dbdec023e7c3c Mon Sep 17 00:00:00 2001 From: Chunk Date: Fri, 24 Apr 2015 09:19:04 +0800 Subject: [PATCH] testing performance... --- test/test_performance.py | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+), 0 deletions(-) create mode 100644 test/test_performance.py diff --git a/test/test_performance.py b/test/test_performance.py new file mode 100644 index 0000000..29ee57a --- /dev/null +++ b/test/test_performance.py @@ -0,0 +1,35 @@ +__author__ = 'chunk' + +import os,sys +from PIL import Image +from ..common import * + +def bench_filereading(): + timer = Timer() + timer.mark() + for path, subdirs, files in os.walk('/data/hadoop/ImageNet/ILSVRC/ILSVRC2013_DET_val/Train_5000'): + for name in files: + imagepath = os.path.join(path, name) + # print imagepath + img = Image.open(imagepath) + img.save(os.path.join('/data/hadoop/ImageNet/ILSVRC/ILSVRC2013_DET_val/tmp', name), format='JPEG') + timer.report() + + """ + performance: + 1000: + 5000: + read-write: + """ + + + + + + + + + + + + -- libgit2 0.21.2