I only use foobar to tell me the duration of the source files.
I use batch files to perform the tests, which use the encoder/decoder in question,
TIMER to record the times taken to encode and decode, and
FSUM to compare the MD5 hash of the decrypted files with that of the source WAVEs.
To calculate the en-/decoding rate you need the duration of the source file, and the time taken to en-/decode. I obtain the duration in seconds (floating point) by loading the files into foobar, setting my copy script as %length_seconds_fp%, selecting all the tracks, copying, and pasting into a text file. This only needs to be done once (which is why I haven't bothered with a more automated process). I use TIMER to record the time taken to en-/decode. My batch files write the result from TIMER to a text file, and then I use a VBS script to scrape the values. The rate is simply the duration/process time; so if the file is 10 seconds long and it takes 2 seconds to encode the rate is 10/2 or 5x.
To calculate the compression you just need the filesize of the source WAVE, and the filesize of the compressed file. I use a simple batch script to create a text file containing the filesizes of the source files. My test batch files record the encoded filesizes as they go. The compression is simply the encoded filesize divided by the source filesize.
TIMER provides timings for both CPU only and CPU+IO. My comparison uses CPU+IO times, but only as that is how i started reporting times, as I started by using TIMETHIS and that's all it will report. The problem with reporting CPU+IO times is that the figures are distorted by my hard drives. Although they are accurate for my system, they may not portray the results that someone else will see. All that can be said is that they are correct in relation to each other. Ooh look, a chart:

This chart shows the difference between CPU-only and CPU+IO speeds. As you can see, my hard drive starts having problems around 30x, and can't get over 80x.
In other (other than my TAK comparison pages) results I have provided I tend to report CPU-only times.
I run my tests from a root folder. I have a folder called "source" which contains all the source WAVE files. This folder also contains "size.txt" (a list of filesizes in bytes for each file); "duration.txt" (a list of durations in seconds (x.xxx) for each file) and "digests.md5" (a list of MD5 hashes which is used to compare with the decoded files' hashes).
I then have other folders, like "FLAC" or "WavPack", in which I have subfolders for versions, etc. Within these folders I have one folder per setting (e.g. "fx3"). Each folder has three batch files: "encode.bat" to encode all the source files; "decode.bat" to decode all the encoded files; and "md5.bat" to compare the MD5 hashes (called by "decode.bat").
My TAK comparison uses an Access database as the backend. This is populated by a VBS script that scrapes all the test data (encode times, decode times and filesizes) and runs SQL statements.
I have another VBS script that will simply extract global and process times from the TIMER output and write the values to a text file. I use this script for other result sets where I use Excel to calculate the values, and where I will generally use the process (CPU-only) times. As all my scripts write text files that have one value per line it is easy to copy and paste into an Excel table, and then use formulae to calculate the rates and compression.
I have tried to make my batch file system as easy to reuse as possible, as I have reused it many, many times myself now. If you are interested, I am happy to provide you with my scripts.