commit f355251cc75f38df0e1c1e8571ff5f8efadb0ca6
Author: David Sorber <dsorber@ryft.com>
Date:   Fri Nov 14 11:53:34 2014 -0500

    Created another script to dump the raw extent sizes so that you can then calculate things like the standard deviation.

diff --git a/software/fiemap_testing/raw_data.py b/software/fiemap_testing/raw_data.py
new file mode 100644
index 0000000..78ea93e
--- /dev/null
+++ b/software/fiemap_testing/raw_data.py
@@ -0,0 +1,36 @@
+import os
+import sys
+
+import fiemap
+
+def main():
+    
+    if len(sys.argv) < 2:
+        print 'ERROR: not enough arguments provided'
+        return -1
+        
+    base_path = sys.argv[1]
+        
+    # Iterate over all of the "file" directories
+    directories = [d for d in os.listdir(base_path) 
+                   if os.path.isdir(os.path.join(base_path, d))]
+    dir_total = len(directories)
+    
+    for directory in directories:
+        path = os.path.join(base_path, directory)
+                
+        # Iterate over all of the chunk files
+        for file_ in os.listdir(path):
+            file_path = os.path.join(path, file_)
+            
+            # Open a chunk file to perform the fiemap call
+            with open(file_path, 'r') as fd:
+                map_ = fiemap.get_all_mappings(fd)
+                
+                # Output the chunk file name and each extent size
+                for extent in map_.extents:
+                    print '%s, %d' % (file_, extent.length)
+                    
+                    
+if __name__ == '__main__':
+    sys.exit(main())
