Commit 67d3dd0593acc73d3fa54441232dbdec023e7c3c

Authored by Chunk
1 parent 13eeb488
Exists in master and in 1 other branch refactor

testing performance...

Showing 1 changed file with 35 additions and 0 deletions   Show diff stats
test/test_performance.py 0 → 100644
... ... @@ -0,0 +1,35 @@
  1 +__author__ = 'chunk'
  2 +
  3 +import os,sys
  4 +from PIL import Image
  5 +from ..common import *
  6 +
  7 +def bench_filereading():
  8 + timer = Timer()
  9 + timer.mark()
  10 + for path, subdirs, files in os.walk('/data/hadoop/ImageNet/ILSVRC/ILSVRC2013_DET_val/Train_5000'):
  11 + for name in files:
  12 + imagepath = os.path.join(path, name)
  13 + # print imagepath
  14 + img = Image.open(imagepath)
  15 + img.save(os.path.join('/data/hadoop/ImageNet/ILSVRC/ILSVRC2013_DET_val/tmp', name), format='JPEG')
  16 + timer.report()
  17 +
  18 + """
  19 + performance:
  20 + 1000:
  21 + 5000:
  22 + read-write:
  23 + """
  24 +
  25 +
  26 +
  27 +
  28 +
  29 +
  30 +
  31 +
  32 +
  33 +
  34 +
  35 +
... ...