Mon 29 May 2006 10:15:36 AM UTC, original submission:
For each file in the underware data repository (sounds, 3d data, animation data, curves), write a program that returns the size of the uncompressed, in-core memory used. The program takes a single argument, the filename. There may be a different program for each file type.
Write an XML file that maps file extension to the program able to compute the in-core memory usage. The extension is perl regular expression. It also associates a unique mime type to the file, based on the normalized names if they exists. A comment pointing to the file format definition is associated to each mime type. With a one line comment explaining the purpose of the file format.
<memory_usage><mime type="image/tiff" extension=".(tif|tiff)">tiff_compute</mime>....
Write a python script that computes the in-core memory usage of the files read from stdin, one per line, based on the XML file defined above. The ouput is one line per file with the following fields, separated by a field separator (tab by default):
file name, mime type, in-core memory size
The python script must take three options defining the new line character (input and output) and the field separator.
write a bash script that runs the python script on each argument provided on the command line and create a ploticus chart showing the file sizes by mime type (y is mime type, x is cumulated file size, largest file first with filename legend if enough space). The legend of this single chart must show the number of files for each mime type and the total in-memory space.
Create a directory tree with at least a single file for each mime type. In a subdirectory add three files of the same mime type. Write a bash script that runs the bash script described above on all the files of the directory (not the directory itself) and the subdirectory (not the files from the subdirectory) and compare the resulting image to a reference image. Fail if the images are different.
|