===============
Macbook, after restart so should be no disk caching
================
---------------
test_full_read()
---------------
Sat Jan  2 13:58:41 2010    /tmp/pydicom_stats

         199835 function calls (199443 primitive calls) in 2.593 CPU seconds

   Ordered by: internal time
   List reduced from 52 to 5 due to restriction <5>

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
    58180    2.296    0.000    2.296    0.000 {method 'read' of 'file' objects}
19412/19048    0.091    0.000    1.041    0.000 filereader.py:119(data_element_generator)
  228/200    0.059    0.000    1.158    0.006 filereader.py:195(read_dataset)
    19156    0.051    0.000    0.051    0.000 tag.py:74(TupleTag)
    38372    0.018    0.000    0.018    0.000 {method 'tell' of 'file' objects}


---------------
test_partial()
---------------
Sat Jan  2 13:58:44 2010    /tmp/pydicom_stats

         200265 function calls (199803 primitive calls) in 3.001 CPU seconds

   Ordered by: internal time
   List reduced from 50 to 5 due to restriction <5>

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
    58398    2.444    0.000    2.444    0.000 {method 'read' of 'file' objects}
        1    0.271    0.271    3.001    3.001 time_test.py:55(test_partial)
19488/19059    0.091    0.000    1.137    0.000 filereader.py:119(data_element_generator)
  233/200    0.058    0.000    1.256    0.006 filereader.py:195(read_dataset)
    19222    0.053    0.000    0.053    0.000 tag.py:74(TupleTag)


---------------
test_mem_read_full()
---------------
Sat Jan  2 13:58:47 2010    /tmp/pydicom_stats

         200252 function calls (199804 primitive calls) in 2.853 CPU seconds

   Ordered by: internal time
   List reduced from 54 to 5 due to restriction <5>

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
      100    2.542    0.025    2.542    0.025 {method 'read' of 'file' objects}
19442/19026    0.087    0.000    0.165    0.000 filereader.py:119(data_element_generator)
  232/200    0.055    0.000    0.270    0.001 filereader.py:195(read_dataset)
    19178    0.047    0.000    0.047    0.000 tag.py:74(TupleTag)
    58262    0.047    0.000    0.047    0.000 {method 'read' of 'cStringIO.StringI' objects}


---------------
test_python_read_files()
---------------
Sat Jan  2 13:58:49 2010    /tmp/pydicom_stats

         203 function calls in 2.621 CPU seconds

   Ordered by: internal time

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
      100    2.596    0.026    2.596    0.026 {method 'read' of 'file' objects}
        1    0.011    0.011    2.621    2.621 <string>:1(<module>)
      100    0.009    0.000    0.009    0.000 {open}
        1    0.005    0.005    2.609    2.609 time_test.py:71(test_python_read_files)
        1    0.000    0.000    0.000    0.000 {method 'disable' of '_lsprof.Profiler' objects}

=========================================
Second run immediately after first run after restart
=========================================

---------------
test_full_read()
---------------
Sat Jan  2 14:02:02 2010    /tmp/pydicom_stats

         199531 function calls (199153 primitive calls) in 0.728 CPU seconds

   Ordered by: internal time
   List reduced from 52 to 5 due to restriction <5>

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
    58107    0.496    0.000    0.496    0.000 {method 'read' of 'file' objects}
19387/19036    0.079    0.000    0.202    0.000 filereader.py:119(data_element_generator)
  227/200    0.048    0.000    0.301    0.002 filereader.py:195(read_dataset)
    19133    0.044    0.000    0.044    0.000 tag.py:74(TupleTag)
    38520    0.016    0.000    0.016    0.000 {_struct.unpack}


---------------
test_partial()
---------------
Sat Jan  2 14:02:02 2010    /tmp/pydicom_stats

         199935 function calls (199543 primitive calls) in 0.412 CPU seconds

   Ordered by: internal time
   List reduced from 50 to 5 due to restriction <5>

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
    58390    0.176    0.000    0.176    0.000 {method 'read' of 'file' objects}
19482/19118    0.080    0.000    0.212    0.000 filereader.py:119(data_element_generator)
  228/200    0.049    0.000    0.314    0.002 filereader.py:195(read_dataset)
    19226    0.047    0.000    0.047    0.000 tag.py:74(TupleTag)
    38708    0.016    0.000    0.016    0.000 {_struct.unpack}


---------------
test_mem_read_full()
---------------
Sat Jan  2 14:02:03 2010    /tmp/pydicom_stats

         200438 function calls (200004 primitive calls) in 0.511 CPU seconds

   Ordered by: internal time
   List reduced from 54 to 5 due to restriction <5>

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
      100    0.245    0.002    0.245    0.002 {method 'read' of 'file' objects}
19466/19063    0.079    0.000    0.150    0.000 filereader.py:119(data_element_generator)
  231/200    0.048    0.000    0.242    0.001 filereader.py:195(read_dataset)
    58336    0.043    0.000    0.043    0.000 {method 'read' of 'cStringIO.StringI' objects}
    19204    0.042    0.000    0.042    0.000 tag.py:74(TupleTag)


---------------
test_python_read_files()
---------------
Sat Jan  2 14:02:03 2010    /tmp/pydicom_stats

         203 function calls in 0.192 CPU seconds

   Ordered by: internal time

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
      100    0.178    0.002    0.178    0.002 {method 'read' of 'file' objects}
        1    0.011    0.011    0.192    0.192 <string>:1(<module>)
      100    0.002    0.000    0.002    0.000 {open}
        1    0.001    0.001    0.181    0.181 time_test.py:71(test_python_read_files)
        1    0.000    0.000    0.000    0.000 {method 'disable' of '_lsprof.Profiler' objects}

===================================================
Third run after restart
Disk caching again reduces the time. Now down to 0.3 seconds/100. 
Reading alone is 0.1 sec/100 file
===================================================

Sampling from 423 files . Each test gets 100 distinct files
---------------
test_full_read()
---------------
Sat Jan  2 14:04:06 2010    /tmp/pydicom_stats

         200491 function calls (200043 primitive calls) in 0.327 CPU seconds

   Ordered by: internal time
   List reduced from 52 to 5 due to restriction <5>

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
    58304    0.092    0.000    0.092    0.000 {method 'read' of 'file' objects}
19456/19040    0.079    0.000    0.182    0.000 filereader.py:119(data_element_generator)
  232/200    0.049    0.000    0.282    0.001 filereader.py:195(read_dataset)
    19192    0.045    0.000    0.045    0.000 tag.py:74(TupleTag)
    38424    0.016    0.000    0.016    0.000 {method 'tell' of 'file' objects}


---------------
test_partial()
---------------
Sat Jan  2 14:04:06 2010    /tmp/pydicom_stats

         199657 function calls (199223 primitive calls) in 0.333 CPU seconds

   Ordered by: internal time
   List reduced from 50 to 5 due to restriction <5>

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
    58252    0.098    0.000    0.098    0.000 {method 'read' of 'file' objects}
19438/19035    0.078    0.000    0.185    0.000 filereader.py:119(data_element_generator)
  231/200    0.048    0.000    0.285    0.001 filereader.py:195(read_dataset)
    19176    0.046    0.000    0.046    0.000 tag.py:74(TupleTag)
    38614    0.016    0.000    0.016    0.000 {_struct.unpack}


---------------
test_mem_read_full()
---------------
Sat Jan  2 14:04:06 2010    /tmp/pydicom_stats

         200648 function calls (200214 primitive calls) in 0.346 CPU seconds

   Ordered by: internal time
   List reduced from 54 to 5 due to restriction <5>

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
      100    0.081    0.001    0.081    0.001 {method 'read' of 'file' objects}
19487/19084    0.079    0.000    0.150    0.000 filereader.py:119(data_element_generator)
  231/200    0.048    0.000    0.242    0.001 filereader.py:195(read_dataset)
    58399    0.043    0.000    0.043    0.000 {method 'read' of 'cStringIO.StringI' objects}
    19225    0.042    0.000    0.042    0.000 tag.py:74(TupleTag)


---------------
test_python_read_files()
---------------
Sat Jan  2 14:04:07 2010    /tmp/pydicom_stats

         203 function calls in 0.094 CPU seconds

   Ordered by: internal time

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
      100    0.079    0.001    0.079    0.001 {method 'read' of 'file' objects}
        1    0.011    0.011    0.094    0.094 <string>:1(<module>)
      100    0.002    0.000    0.002    0.000 {open}
        1    0.002    0.002    0.083    0.083 time_test.py:71(test_python_read_files)
        1    0.000    0.000    0.000    0.000 {method 'disable' of '_lsprof.Profiler' objects}


